home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / GameCreators / Inform / examples / Advent.inf next >
Encoding:
Text File  |  1997-03-15  |  139.6 KB  |  3,804 lines

  1. ! ----------------------------------------------------------------------------
  2. !  Advent 961209      A classic and one of the standard Inform 6 example games
  3. !
  4. !
  5. !                                      Adapted to Inform 5: 17.5.94 to 24.5.94
  6. !                 Modernised to Inform 5.5 and library 5/12 or later: 20.12.95
  7. !                    Modernised to Inform 6 and library 6/1 or later: 11.11.96
  8. !                     A few bugs removed and companion text rewritten: 9.12.96
  9. ! ----------------------------------------------------------------------------
  10.  
  11. ! Constant TEST_VERSION;
  12.  
  13. Constant Story "ADVENTURE";
  14. Constant Headline
  15.            "^The Interactive Original^
  16.              By Will Crowther (1973) and Don Woods (1977)^
  17.              Reconstructed in three steps by:^
  18.              Donald Ekman, David M. Baggett (1993) and Graham Nelson (1994)^
  19.              [In memoriam Stephen Bishop (1820?-1857): GN]^";
  20.  
  21. Serial "961209";
  22. Release 5;
  23.  
  24. Constant MAX_CARRIED = 7;
  25. Constant MAX_SCORE = 350;
  26. Constant MAX_TREASURES = 15;
  27. Constant AMUSING_PROVIDED;
  28.  
  29. Include "Parser";
  30. Include "VerbLib";
  31.  
  32. Attribute nodwarf;
  33. Attribute treasure_found;
  34. Attribute multitude;
  35.  
  36. Global caves_closed;
  37. Global canyon_from;
  38. Global treasures_found;
  39. Global deaths;
  40. Global dark_warning;
  41. Global feefie_count;
  42.  
  43. ! ----------------------------------------------------------------------------
  44. !   Rules for treasures, which will be scattered all over the game
  45. ! ----------------------------------------------------------------------------
  46.  
  47. Class Treasure
  48.  with depositpoints 10,
  49.       after
  50.       [; Take: if (location==Inside_Building)
  51.                     score=score-self.depositpoints;
  52.                score=score+5;
  53.                if (noun hasnt treasure_found)
  54.                {   give noun treasure_found; treasures_found++;
  55.                    score=score+2;
  56.                }
  57.                "Taken!";
  58.          Drop: score=score-5;
  59.                if (location==Inside_Building)
  60.                {   score=score+self.depositpoints;
  61.                    "Safely deposited.";
  62.                }               
  63.       ];
  64.  
  65. ! ----------------------------------------------------------------------------
  66. !   The outside world
  67. ! ----------------------------------------------------------------------------
  68.  
  69. Class AboveGround
  70.   has  light nodwarf;
  71.  
  72. AboveGround At_End_Of_Road "At End Of Road"
  73.   with description "You are standing at the end of a road before a small 
  74.                     brick building. Around you is a forest. A small 
  75.                     stream flows out of the building and down a gully.",
  76.        w_to At_Hill_In_Road, u_to At_Hill_In_Road, e_to Inside_Building,
  77.        d_to In_A_Valley, s_to In_A_Valley, n_to In_Forest_1,
  78.        in_to Inside_Building,
  79.        name "gully" "road" "street" "path";
  80.  
  81. Object "well house"
  82.   with name "well" "house" "brick" "building" "small" "wellhouse",
  83.        description "It's a small brick building. It seems to be a well house.",
  84.        found_in  At_End_Of_Road  At_Hill_In_Road  Inside_Building
  85.   has  scenery;
  86.  
  87. Object Stream "stream"
  88.   with name "stream" "water" "brook" "river" "lake"
  89.             "small" "tumbling" "splashing" "babbling" "rushing" "reservoir",
  90.        found_in At_End_Of_Road  In_A_Valley  At_Slit_In_Streambed
  91.                 In_Pit  In_Cavern_With_Waterfall
  92.                 At_Reservoir
  93.                 Inside_Building,
  94.        before
  95.        [; Drink: 
  96.                  "You have taken a drink from the stream. The water 
  97.                   tastes strongly of minerals, but is not unpleasant. 
  98.                   It is extremely cold.";
  99.           Take: if (bottle notin player)
  100.                     "You have nothing in which to carry the water.";
  101.                 <<Fill bottle>>;
  102.           Insert: if (second == bottle) <<Fill bottle>>;
  103.                     "You have nothing in which to carry the water.";
  104.           Receive: if (noun == ming_vase)
  105.                 {   remove ming_vase; move shards to location;
  106.                     score=score-5;
  107.                     "The sudden change in temperature 
  108.                      has delicately shattered the vase.";
  109.                 }
  110.                 if (noun == bottle) <<Fill bottle>>;
  111.                 remove noun; if (noun ofclass Treasure) score=score-5;
  112.                 print_ret (The) noun, " washes away with the stream.";
  113.        ],
  114.   has  scenery;
  115.  
  116. Object "road"
  117.   with name "road" "street" "path" "dirt",
  118.        description "The road is dirt, not yellow brick.",
  119.        found_in  At_End_Of_Road  At_Hill_In_Road  In_Forest_2
  120.   has  scenery;
  121.  
  122. Object "forest"
  123.   with name     "forest" "tree" "trees" "oak" "maple" "grove" "pine"
  124.                 "spruce" "birch" "ash" "saplings" "bushes" "leaves"
  125.                 "berry" "berries" "hardwood",
  126.        description
  127.                 "The trees of the forest are large hardwood oak and 
  128.                 maple, with an occasional grove of pine or spruce. 
  129.                 There is quite a bit of undergrowth, largely birch 
  130.                 and ash saplings plus nondescript bushes of various 
  131.                 sorts. This time of year visibility is quite 
  132.                 restricted by all the leaves, but travel is quite 
  133.                 easy if you detour around the spruce and berry 
  134.                 bushes.",
  135.        found_in At_End_Of_Road  At_Hill_In_Road  In_A_Valley
  136.                 In_Forest_1  In_Forest_2
  137.   has  scenery multitude;
  138.  
  139.  
  140. AboveGround At_Hill_In_Road "At Hill In Road"
  141.   with description "You have walked up a hill, still in the forest. The road 
  142.                slopes back down the other side of the hill. There is a 
  143.                building in the distance.",
  144.        e_to At_End_Of_Road,
  145.        n_to At_End_Of_Road,
  146.        d_to At_End_Of_Road,
  147.        s_to In_Forest_1,
  148.        name "gully" "road" "street" "path";
  149.  
  150. Object -> "hill"
  151.   with description "It's just a typical hill.",
  152.        name "hill" "bump" "incline"
  153.   has  scenery;
  154.  
  155. Object -> "other side of hill"
  156.   with article "the",
  157.        description "Why not explore it yourself?",
  158.        name "side" "other" "of"
  159.   has  scenery;
  160.  
  161.  
  162. AboveGround Inside_Building "Inside Building"
  163.   with description "You are inside a building, a well house for a 
  164.                 large spring.",
  165.        cant_go "The stream flows out through a pair of 1 foot 
  166.                diameter sewer pipes. The only exit is to the west.",
  167.        before
  168.        [; Enter: if (noun==Spring or SewerPipes)
  169.              "The stream flows out through a pair of 1 foot 
  170.               diameter sewer pipes. It would be advisable to use the exit.";
  171.           Xyzzy: if (In_Debris_Room hasnt visited) rfalse;
  172.                  PlayerTo(In_Debris_Room); rtrue;
  173.           Plugh: if (At_Y2 hasnt visited) rfalse;
  174.                  PlayerTo(At_Y2); rtrue;
  175.        ],
  176.        w_to At_End_Of_Road, out_to At_End_Of_Road,
  177.        in_to "The pipes are too small.";
  178.  
  179. Object -> Spring "spring"
  180.   with name "spring" "large",
  181.        description "The stream flows out through a pair of 1 foot 
  182.                 diameter sewer pipes."
  183.   has  scenery;
  184.  
  185. Object -> SewerPipes "pair of 1 foot diameter sewer pipes"
  186.   with name "pipes" "pipe" "one" "foot" "diameter" "sewer" "sewer-pipes",
  187.        description "Too small. The only exit is to the west."
  188.   has  scenery;
  189.  
  190. Object -> set_of_keys "set of keys"
  191.   with description "It's just a normal-looking set of keys.",
  192.        initial "There are some keys on the ground here.",
  193.        before
  194.        [;  Count: "A dozen or so keys.";
  195.        ],
  196.        name "keys" "key" "keyring" "set" "of" "bunch";
  197.  
  198.  
  199. Object -> tasty_food "tasty food"
  200.   with description "Sure looks yummy!", article "some",
  201.        initial "There is tasty food here.",
  202.        name "food" "ration" "rations" "tripe"
  203.             "yummy" "tasty" "delicious" "scrumptious",
  204.        after
  205.        [; Eat: "Delicious!"; ],
  206.   has  edible;
  207.  
  208.  
  209. Object -> brass_lantern "brass lantern"
  210.   with name "lamp" "headlamp" "headlight" "lantern" "light" "shiny" "brass",
  211.        when_off "There is a shiny brass lamp nearby.",
  212.        when_on  "Your lamp is here, gleaming brightly.",
  213.  
  214.        power_remaining 330,
  215.        replace_batteries
  216.        [;  if (fresh_batteries in player or location)
  217.            {   remove fresh_batteries; give fresh_batteries general;
  218.                move old_batteries to location;
  219.                self.power_remaining = 2500;
  220.                "I'm taking the liberty of replacing the batteries.";
  221.            }
  222.        ],
  223.  
  224.        daemon
  225.        [ t; if (self hasnt on) { StopDaemon(self); rtrue; }
  226.          t = --(self.power_remaining);
  227.  
  228.          if (t==0) give self ~on ~light;
  229.  
  230.          if (self in player || self in location)
  231.          {   if (t==0)
  232.              {   
  233.                  print "Your lamp has run out of power.";
  234.                  if (fresh_batteries notin player && location hasnt light)
  235.                  {   deadflag=3;
  236.                      " You can't explore the cave without a lamp. So 
  237.                       let's just call it a day.";
  238.                  }
  239.                  else self.replace_batteries();
  240.                  new_line; rtrue;
  241.              }  
  242.              if (t==30)
  243.              {   print "Your lamp is getting dim.";
  244.                  if (fresh_batteries has general)
  245.                      " You're also out of spare batteries. 
  246.                       You'd best start wrapping this up.";
  247.                  if (fresh_batteries in VendingMachine
  248.                      && Dead_End_14 has visited)
  249.                      " You'd best start wrapping this up, 
  250.                       unless you can find some fresh 
  251.                       batteries. I seem to recall there's a 
  252.                       vending machine in the maze. Bring 
  253.                       some coins with you.";
  254.                  if (fresh_batteries notin
  255.                      VendingMachine or player or location)
  256.                       " You'd best go back for those batteries.";
  257.                  new_line; rtrue;
  258.              }
  259.          }
  260.        ],
  261.        before
  262.        [; Examine: print "It is a shiny brass lamp";
  263.                 if (self hasnt on)
  264.                     ". It is not currently lit.";
  265.                 if (self.power_remaining < 30)
  266.                     ", glowing dimly.";
  267.                 ", glowing brightly.";
  268.           Burn: <<SwitchOn self>>;
  269.           Rub:  "Rubbing the electric lamp is not particularly 
  270.                  rewarding. Anyway, nothing exciting happens.";
  271.           SwitchOn: if (self.power_remaining <= 0)
  272.                 "Unfortunately, the batteries seem to be dead.";
  273.           Receive:
  274.                 if (noun == old_batteries)
  275.                     "Those batteries are dead; they won't do any good at all.";
  276.                 if (noun == fresh_batteries)
  277.                 {   self.replace_batteries(); rtrue; }
  278.                 "The only thing you might successfully put in 
  279.                  the lamp is a fresh pair of batteries.";
  280.        ],
  281.        after
  282.        [; SwitchOn: give self light; StartDaemon(self);
  283.           SwitchOff: give self ~light;
  284.        ],
  285.   has  switchable;
  286.  
  287.  
  288. Object -> bottle "small bottle"
  289.   with name "bottle" "jar" "flask",
  290.        initial "There is an empty bottle here.",
  291.        before
  292.        [; LetGo:
  293.              if (noun in bottle)
  294.                  "You're holding that already (in the bottle).";
  295.          Receive:
  296.              if (noun == stream or Oil) <<Fill self>>;
  297.              else "The bottle is only supposed to hold liquids.";
  298.          Fill:
  299.              if (child(bottle) ~= nothing)
  300.                "The bottle is full already.";
  301.              if (stream in location || Spring in location)
  302.              {   move water_in_the_bottle to bottle;
  303.                  "The bottle is now full of water.";
  304.              }
  305.              if (Oil in location)
  306.              {   move oil_in_the_bottle to bottle;
  307.                  "The bottle is now full of oil.";
  308.              }
  309.              "There is nothing here with which to fill the bottle.";
  310.          Empty: if (child(bottle) == nothing) "The bottle is already empty!";
  311.              remove child(bottle);
  312.              "Your bottle is now empty and the ground is now wet.";
  313.        ],
  314.   has  container open;
  315.  
  316. Object water_in_the_bottle "bottled water"
  317.   with name "bottled" "water" "h2o", article "some",
  318.        before
  319.        [; Drink:  remove water_in_the_bottle; <<Drink Stream>>;
  320.        ],
  321.        description "It looks like ordinary water to me.";
  322.  
  323. Object oil_in_the_bottle "bottled oil"
  324.   with name "oil" "bottled" "lubricant" "grease", article "some",
  325.        before
  326.        [; Drink:  <<Drink Oil>>;
  327.        ],
  328.        description "It looks like ordinary oil to me.";
  329.  
  330.  
  331. AboveGround In_Forest_1 "In Forest"
  332.   with description "You are in open forest, with a deep valley to one side.",
  333.        e_to In_A_Valley,
  334.        d_to In_A_Valley,
  335.        n_to In_Forest_1,
  336.        w_to In_Forest_1,
  337.        s_to In_Forest_1,
  338.        initial [; if (random(2)==1) PlayerTo(In_Forest_2,1); ];
  339.  
  340. AboveGround In_Forest_2 "In Forest"
  341.   with description "You are in open forest near both a valley and a road.",
  342.        n_to At_End_Of_Road,
  343.        e_to In_A_Valley,
  344.        w_to In_A_Valley,
  345.        d_to In_A_Valley,
  346.        s_to In_Forest_1;
  347.  
  348.  
  349. AboveGround In_A_Valley "In A Valley"
  350.   with description
  351.                 "You are in a valley in the forest beside a 
  352.                 stream tumbling along a rocky bed.",
  353.        n_to At_End_Of_Road,
  354.        e_to In_Forest_1,
  355.        w_to In_Forest_1,
  356.        u_to In_Forest_1,
  357.        s_to At_Slit_In_Streambed,
  358.        d_to At_Slit_In_Streambed, name "valley";
  359.  
  360. Object -> "streambed"
  361.   with name "bed" "streambed" "rock" "small" "rocky" "bare" "dry"
  362.   has  scenery;
  363.  
  364.  
  365. AboveGround At_Slit_In_Streambed "At Slit In Streambed"
  366.   with description "At your feet all the water of the stream 
  367.                     splashes into a 2-inch slit in the rock. Downstream 
  368.                     the streambed is bare rock.",
  369.        n_to In_A_Valley,
  370.        e_to In_Forest_1,
  371.        w_to In_Forest_1,
  372.        s_to Outside_Grate,
  373.        d_to "You don't fit through a two-inch slit!",
  374.        in_to "You don't fit through a two-inch slit!";
  375.  
  376. Object -> "2-inch slit"
  377.   with name "slit" "two" "inch" "2-inch",
  378.        description
  379.           "It's just a 2-inch slit in the rock, through which the 
  380.            stream is flowing.",
  381.        before
  382.        [;  Enter: "You don't fit through a two-inch slit!";
  383.        ],       
  384.   has  scenery;
  385.  
  386.  
  387. AboveGround Outside_Grate "Outside Grate"
  388.   with description
  389.                 "You are in a 20-foot depression floored with 
  390.                 bare dirt. Set into the dirt is a strong steel grate 
  391.                 mounted in concrete. A dry streambed leads into the 
  392.                 depression.",
  393.        e_to In_Forest_1,
  394.        w_to In_Forest_1,
  395.        s_to In_Forest_1,
  396.        n_to At_Slit_In_Streambed,
  397.        d_to 
  398.        [; if (Grate hasnt locked && Grate hasnt open)
  399.           {   print "(first opening the grate)^"; give Grate open; }
  400.           return Grate;
  401.        ];
  402.  
  403. Object -> "20-foot depression"
  404.   with description "You're standing in it.",
  405.        name "depression" "dirt" "twenty" "foot" "bare" "20-foot",
  406.   has  scenery;
  407.  
  408. Object -> Grate "steel grate"
  409.   with name "grate" "lock" "gate" "grille" "metal" "strong" "steel" "grating",
  410.        description "It just looks like an ordinary grate mounted in concrete.",
  411.        with_key set_of_keys,
  412.        door_dir
  413.        [; if (location==Below_The_Grate) return u_to; return d_to;
  414.        ],
  415.        door_to
  416.        [; if (location==Below_The_Grate) return Outside_Grate;
  417.           return Below_The_Grate;
  418.        ],
  419.        describe
  420.        [; if (self has open) "^The grate stands open.";
  421.           if (self hasnt locked) "^The grate is unlocked but shut.";
  422.           rtrue;
  423.        ],
  424.        found_in  Below_The_Grate  Outside_Grate
  425.   has  static door openable lockable locked;
  426.  
  427. ! ----------------------------------------------------------------------------
  428. !   Facilis descensus Averno...
  429. ! ----------------------------------------------------------------------------
  430.  
  431. Object Below_The_Grate "Below the Grate"
  432.   with description
  433.                "You are in a small chamber beneath a 3x3 steel 
  434.                grate to the surface. A low crawl over cobbles leads 
  435.                inward to the west.",
  436.        w_to In_Cobble_Crawl,
  437.        u_to Grate
  438.   has  light;
  439.  
  440.  
  441. Object "cobbles"
  442.   with description "They're just ordinary cobbles.",
  443.        name "cobble" "cobbles" "cobblestones" "cobblestone" "stones" "stone",
  444.        found_in  In_Cobble_Crawl  In_Debris_Room  Below_The_Grate
  445.   has  scenery multitude;
  446.  
  447. Object In_Cobble_Crawl "In Cobble Crawl"
  448.   with description
  449.                "You are crawling over cobbles in a low passage. 
  450.                There is a dim light at the east end of the 
  451.                passage.",
  452.        e_to Below_The_Grate,
  453.        w_to In_Debris_Room
  454.   has  light;
  455.  
  456. Object -> wicker_cage "wicker cage"
  457.   with description "It's a small wicker cage.",
  458.        initial "There is a small wicker cage discarded nearby.",
  459.        name "cage" "small" "wicker",
  460.        after
  461.        [; Open: if (little_bird notin self) rfalse;
  462.                 print "(releasing the little bird)^";
  463.                 <<Release little_bird>>;
  464.        ],
  465.   has  container open openable transparent;
  466.  
  467.  
  468. Object In_Debris_Room "In Debris Room"
  469.   with description
  470.                "You are in a debris room filled with stuff 
  471.                washed in from the surface. A low wide passage with 
  472.                cobbles becomes plugged with mud and debris here, but 
  473.                an awkward canyon leads upward and west.^^
  474.                A note on the wall says, ~Magic word XYZZY.~",
  475.        e_to In_Cobble_Crawl,
  476.        u_to In_Awkward_Sloping_E_W_Canyon,
  477.        w_to In_Awkward_Sloping_E_W_Canyon,
  478.        before
  479.        [; Xyzzy: PlayerTo(Inside_Building); rtrue;
  480.        ],
  481.   has  nodwarf;
  482.  
  483. Object -> "debris"
  484.   with description "Yuck.",
  485.        name "debris" "stuff" "mud"
  486.   has  scenery;
  487.  
  488. Object -> "note"
  489.   with description "The note says ~Magic word XYZZY~.",
  490.        name "note"
  491.   has  scenery;
  492.  
  493. Object -> black_rod "black rod with a rusty star on the end"
  494.   with description "It's a three foot black rod with a rusty star on an end.",
  495.        initial "A three foot black rod 
  496.                 with a rusty star on one end lies nearby.",
  497.        name "rod" "star" "black" "rusty" "star" "three" "foot" "iron",
  498.        before
  499.        [; Wave:
  500.            if (location==West_Side_Of_Fissure or On_East_Bank_Of_Fissure)
  501.            {   if (caves_closed) "Peculiar. Nothing happens.";
  502.                if (CrystalBridge notin nothing)
  503.                {   remove CrystalBridge; give CrystalBridge absent;
  504.                    West_Side_Of_Fissure.e_to = 0;
  505.                    On_East_Bank_Of_Fissure.w_to = 0;
  506.                    "The crystal bridge has vanished!";
  507.                }
  508.                else
  509.                {   move CrystalBridge to location; give CrystalBridge ~absent;
  510.                    West_Side_Of_Fissure.e_to = CrystalBridge;
  511.                    On_East_Bank_Of_Fissure.w_to = CrystalBridge;
  512.                    "A crystal bridge now spans the fissure.";
  513.                }
  514.            }
  515.            "Nothing happens.";
  516.        ];
  517.  
  518.  
  519. Object In_Awkward_Sloping_E_W_Canyon "Sloping E/W Canyon"
  520.   with description
  521.                "You are in an awkward sloping east/west canyon.",
  522.        d_to In_Debris_Room,
  523.        e_to In_Debris_Room,
  524.        u_to In_Bird_Chamber,
  525.        w_to In_Bird_Chamber
  526.   has  nodwarf;
  527.  
  528. ! ----------------------------------------------------------------------------
  529. !   The little bird in its natural habitat
  530. ! ----------------------------------------------------------------------------
  531.  
  532. Object In_Bird_Chamber "Orange River Chamber"
  533.   with description
  534.                "You are in a splendid chamber thirty feet high. 
  535.                The walls are frozen rivers of orange stone. An 
  536.                awkward canyon and a good passage exit from east and 
  537.                west sides of the chamber.",
  538.        e_to In_Awkward_Sloping_E_W_Canyon,
  539.        w_to At_Top_Of_Small_Pit
  540.   has  nodwarf;
  541.  
  542. Object -> little_bird "little bird"
  543.   with name "cheerful" "mournful" "little" "bird",
  544.        initial "A cheerful little bird is sitting here singing.",
  545.        before
  546.        [; Examine:
  547.               if (self in wicker_cage)
  548.                   "The little bird looks unhappy in the cage.";
  549.              "The cheerful little bird is sitting here singing.";
  550.           Insert: if (second==wicker_cage) <<Catch self>>;
  551.               else 
  552.                   "Don't put the poor bird in ", (the) second, "!";
  553.           Drop, Remove:
  554.               if (self in wicker_cage)
  555.               {   print "(The bird is released from the cage.)^^";
  556.                   <<Release self>>;
  557.               }
  558.           Take, Catch:
  559.             if (self in wicker_cage)
  560.                 "You already have the little bird. If 
  561.                  you take it out of the cage it will likely 
  562.                  fly away from you.";
  563.             if (wicker_cage notin player)
  564.                 "You can catch the bird, but you cannot carry it.";
  565.             if (black_rod in player)
  566.                 "The bird was unafraid when you entered, but 
  567.                  as you approach it becomes disturbed and you 
  568.                  cannot catch it.";
  569.             move self to wicker_cage; give wicker_cage ~open;
  570.             "You catch the bird in the wicker cage.";
  571.  
  572.           Release:
  573.             if (self notin wicker_cage) "The bird is not caged now.";
  574.             give wicker_cage open;
  575.             move self to location;
  576.  
  577.             if (Snake in location)
  578.             {   remove Snake;
  579.                 "The little bird attacks the green snake, and 
  580.                  in an astounding flurry drives the snake 
  581.                  away.";
  582.             }
  583.  
  584.             if (Dragon in location)
  585.             {   remove self;
  586.                 "The little bird attacks the green dragon, 
  587.                  and in an astounding flurry gets burnt to a 
  588.                  cinder. The ashes blow away.";
  589.             }
  590.  
  591.             "The little bird flies free.";
  592.        ],
  593.  
  594.        life
  595.        [; Give: "It's not hungry. (It's merely pinin' for the 
  596.                  fjords). Besides, I suspect it would prefer bird seed.";
  597.          Order, Ask, Answer: "Cheep! Chirp!";
  598.          Attack:
  599.              if (self in wicker_cage)
  600.                 "Oh, leave the poor unhappy bird alone.";
  601.              remove self;
  602.             "The little bird is now dead. Its body disappears.";
  603.        ],
  604.   has  animate;
  605.  
  606.  
  607. Object At_Top_Of_Small_Pit "At Top of Small Pit"
  608.   with description
  609.                "At your feet is a small pit breathing traces of 
  610.                white mist. A west passage ends here except for a 
  611.                small crack leading on.^^
  612.                Rough stone steps lead down the pit.",
  613.        e_to In_Bird_Chamber,
  614.        w_to "The crack is far too small for you to follow.",
  615.        d_to
  616.        [; if (large_gold_nugget in player)
  617.           {   deadflag=1;
  618.               "You are at the bottom of the pit with a broken neck.";
  619.           }
  620.           return In_Hall_Of_Mists;
  621.        ],
  622.        before
  623.        [; Enter: if (noun==PitCrack)
  624.               "The crack is far too small for you to follow.";
  625.        ],
  626.   has  nodwarf;
  627.  
  628.  
  629. Object -> "small pit"
  630.   with description "The pit is breathing traces of white mist.",
  631.        name "pit" "small"
  632.   has  scenery;
  633.  
  634. Object -> PitCrack "crack"
  635.   with description
  636.            "The crack is very small -- far too small for you to follow.",
  637.        name "crack" "small"
  638.   has  scenery;
  639.  
  640. Object "mist"
  641.   with description
  642.                "Mist is a white vapor, usually water, seen from time 
  643.                to time in caverns. It can be found anywhere but is 
  644.                frequently a sign of a deep pit leading down to 
  645.                water.",
  646.        name "mist" "vapor" "wisps" "white",
  647.        found_in  At_Top_Of_Small_Pit In_Hall_Of_Mists
  648.                  On_East_Bank_Of_Fissure  At_Window_On_Pit_1
  649.                  At_West_End_Of_Hall_Of_Mists In_Misty_Cavern
  650.                  In_Mirror_Canyon  At_Reservoir At_Window_On_Pit_2
  651.                  On_Sw_Side_Of_Chasm
  652.   has  scenery;
  653.  
  654. ! ----------------------------------------------------------------------------
  655. !   The caves open up: The Hall of Mists
  656. ! ----------------------------------------------------------------------------
  657.  
  658. Object In_Hall_Of_Mists "In Hall of Mists"
  659.   with initial
  660.        [;  if (self has general) rfalse;
  661.            score=score+25; give self general;
  662.        ],
  663.        description
  664.                "You are at one end of a vast hall stretching 
  665.                forward out of sight to the west. There are openings 
  666.                to either side. Nearby, a wide stone staircase leads 
  667.                downward. The hall is filled with wisps of white 
  668.                mist swaying to and fro almost as if alive. A cold 
  669.                wind blows up the staircase. There is a passage at 
  670.                the top of a dome behind you.^^
  671.                Rough stone steps lead up the dome.",
  672.        s_to In_Nugget_Of_Gold_Room,
  673.        w_to On_East_Bank_Of_Fissure,
  674.        d_to In_Hall_Of_Mt_King,
  675.        n_to In_Hall_Of_Mt_King,
  676.        u_to
  677.        [;  if (large_gold_nugget in player) "The dome is unclimbable.";
  678.            return At_Top_Of_Small_Pit;
  679.        ];
  680.  
  681. Object -> "wide stone staircase"
  682.   with description "The staircase leads down.",
  683.        name "stair" "stairs" "staircase" "wide" "stone"
  684.   has  scenery;
  685.  
  686. Object -> "rough stone steps"
  687.   with description "The rough stone steps lead up the dome.",
  688.        name "stair" "stairs" "staircase" "rough" "stone"
  689.   has  scenery multitude;
  690.  
  691. Object -> "dome"
  692.   with name "dome",
  693.        before
  694.        [; Examine: if (large_gold_nugget in player)
  695.                        "I'm not sure you'll be able to get up it 
  696.                         with what you're carrying.";
  697.                    "It looks like you might be able to climb up it.";
  698.          Climb: MovePlayer(u_obj); rtrue;
  699.        ],
  700.   has  scenery;
  701.  
  702.  
  703. Object In_Nugget_Of_Gold_Room "Low Room"
  704.   with description
  705.                "This is a low room with a crude note on the 
  706.                 wall:^^
  707.                 ~You won't get it up the steps~.",
  708.        n_to In_Hall_Of_Mists;
  709.  
  710. Object -> "note"
  711.   with description "The note says, ~You won't get it up the steps~.",
  712.        name "note" "crude"
  713.   has  scenery;
  714.  
  715. Treasure -> large_gold_nugget "large gold nugget"
  716.   with description "It's a large sparkling nugget of gold!",
  717.        initial "There is a large sparkling nugget of gold here!",
  718.        name "gold" "nugget" "large" "heavy";
  719.  
  720.  
  721. Class  FissureRoom
  722.   with before
  723.        [;
  724.           Jump: if (CrystalBridge hasnt absent)
  725.                   "I respectfully suggest you go across the 
  726.                              bridge instead of jumping.";
  727.                 deadflag=1;
  728.                 "You didn't make it.";
  729.        ],
  730.        d_to "The fissure is too terrifying!";
  731.  
  732.  
  733. FissureRoom On_East_Bank_Of_Fissure "On East Bank of Fissure"
  734.   with description
  735.                "You are on the east bank of a fissure slicing 
  736.                clear across the hall. The mist is quite thick here, 
  737.                and the fissure is too wide to jump.",
  738.        e_to In_Hall_Of_Mists, w_to "The fissure is too wide.";
  739.  
  740. FissureRoom West_Side_Of_Fissure "West Side of Fissure"
  741.   with description
  742.                "You are on the west side of the fissure in the 
  743.                hall of mists.",
  744.        w_to At_West_End_Of_Hall_Of_Mists,
  745.        e_to "The fissure is too wide.",
  746.        n_to At_West_End_Of_Hall_Of_Mists,
  747.        before
  748.        [;   Go: if (location==West_Side_Of_Fissure && noun==n_obj)
  749.                 print "You have crawled through a very low wide passage 
  750.                        parallel to and north of the hall of mists.^";
  751.        ];
  752.  
  753. Treasure -> "diamonds"
  754.   with article "some",
  755.        description "They look to be of the highest quality!",
  756.        initial "There are diamonds here!",
  757.        name "diamond" "diamonds" "several" "high" "quality"
  758.   has  multitude;
  759.  
  760.  
  761. Object CrystalBridge "crystal bridge"
  762.   with initial "A crystal bridge now spans the fissure.",
  763.        description "It spans the fissure, thereby providing you a way across.",
  764.        door_dir
  765.        [;  if (location==West_Side_Of_Fissure) return e_to; return w_to;
  766.        ],
  767.        door_to
  768.        [;  if (location==West_Side_Of_Fissure) return On_East_Bank_Of_Fissure;
  769.            return West_Side_Of_Fissure;
  770.        ],
  771.        name "crystal" "bridge",
  772.        found_in  On_East_Bank_Of_Fissure  West_Side_Of_Fissure
  773.   has  static door open absent;
  774.  
  775. Object "fissure"
  776.   with name "wide" "fissure",
  777.        description "The fissure looks far too wide to jump.",
  778.        found_in  On_East_Bank_Of_Fissure  West_Side_Of_Fissure
  779.   has  scenery;
  780.  
  781.  
  782. Object At_West_End_Of_Hall_Of_Mists "At West End of Hall of Mists"
  783.   with description
  784.                "You are at the west end of the hall of mists. 
  785.                A low wide crawl continues west and another goes 
  786.                north. To the south is a little passage 6 feet off 
  787.                the floor.",
  788.        s_to Alike_Maze_1,
  789.        u_to Alike_Maze_1,
  790.        e_to West_Side_Of_Fissure,
  791.        w_to At_East_End_Of_Long_Hall,
  792.        n_to West_Side_Of_Fissure,
  793.        before
  794.        [; Go: if (noun==n_obj)
  795.                 print "You have crawled through a very low wide passage 
  796.                        parallel to and north of the hall of mists.^";
  797.        ];
  798.  
  799. ! ----------------------------------------------------------------------------
  800. !   Long Hall to the west of the Hall of Mists
  801. ! ----------------------------------------------------------------------------
  802.  
  803. Object At_East_End_Of_Long_Hall "At East End of Long Hall"
  804.   with description
  805.                "You are at the east end of a very long hall 
  806.                apparently without side chambers. To the east a low 
  807.                wide crawl slants up. To the north a round two foot 
  808.                hole slants down.",
  809.        e_to At_West_End_Of_Hall_Of_Mists,
  810.        u_to At_West_End_Of_Hall_Of_Mists,
  811.        w_to At_West_End_Of_Long_Hall,
  812.        n_to Crossover,
  813.        d_to Crossover;
  814.  
  815. Object At_West_End_Of_Long_Hall "At West End of Long Hall"
  816.   with description
  817.                "You are at the west end of a very long 
  818.                featureless hall. The hall joins up with a narrow 
  819.                north/south passage.",
  820.        e_to At_East_End_Of_Long_Hall,
  821.        s_to Different_Maze_1,
  822.        n_to Crossover;
  823.  
  824. Object Crossover "N/S and E/W Crossover"
  825.   with description
  826.                "You are at a crossover of a high N/S passage 
  827.                and a low E/W one.",
  828.        w_to At_East_End_Of_Long_Hall,
  829.        n_to Dead_End_7,
  830.        e_to In_West_Side_Chamber,
  831.        s_to At_West_End_Of_Long_Hall;
  832.  
  833. Object -> "crossover"
  834.   with description "You know as much as I do at this point.",
  835.        name "crossover" "over" "cross"
  836.   has  scenery;
  837.  
  838. ! ----------------------------------------------------------------------------
  839. !   Many Dead Ends will be needed for the maze below, so define a class:
  840. ! ----------------------------------------------------------------------------
  841.  
  842. Class  DeadEndRoom
  843.   with short_name "Dead End",
  844.        description "You have reached a dead end.",
  845.        cant_go "You'll have to go back the way you came.";
  846.  
  847. DeadEndRoom Dead_End_7
  848.   with s_to Crossover,
  849.        out_to Crossover;
  850.  
  851. ! ----------------------------------------------------------------------------
  852. !   The Hall of the Mountain King and side chambers
  853. ! ----------------------------------------------------------------------------
  854.  
  855. Object In_Hall_Of_Mt_King "Hall of the Mountain King"
  856.   with description
  857.                "You are in the hall of the mountain king, with 
  858.                passages off in all directions.",
  859.        cant_go "Well, perhaps not quite all directions.",
  860.        u_to In_Hall_Of_Mists,
  861.        e_to In_Hall_Of_Mists,
  862.        n_to Low_N_S_Passage,
  863.        s_to In_South_Side_Chamber,
  864.        w_to In_West_Side_Chamber,
  865.        sw_to In_Secret_E_W_Canyon,
  866.        before
  867.        [; Go: if (Snake in self
  868.                   && (noun == n_obj or s_obj or w_obj
  869.                       || (noun == sw_obj && random(100) <= 35)))
  870.                   "You can't get by the snake.";
  871.        ];
  872.  
  873. Object -> Snake "snake"
  874.   with description "I wouldn't mess with it if I were you.",
  875.        initial "A huge green fierce snake bars the way!",
  876.        name "snake" "cobra" "asp" "huge" "fierce" "green"
  877.             "ferocious" "venemous" "venomous" "large" "big" "killer",
  878.        life
  879.        [; Order, Ask, Answer: "Hiss!";
  880.          ThrowAt: if (noun==axe) <<Attack self>>;
  881.                   <<Give noun self>>;
  882.          Give: if (noun==little_bird)
  883.                {   remove little_bird;
  884.                    "The snake has now devoured your bird.";
  885.                }
  886.                "There's nothing here it wants to eat (except perhaps you).";
  887.          Attack: "Attacking the snake both doesn't work 
  888.                   and is very dangerous.";
  889.          Take: deadflag=1; "It takes you instead. Glrp!";
  890.        ],
  891.   has  animate;
  892.  
  893.  
  894. Object Low_N_S_Passage "Low N/S Passage"
  895.   with description
  896.                "You are in a low N/S passage at a hole in the 
  897.                floor. The hole goes down to an E/W passage.",
  898.        s_to In_Hall_Of_Mt_King,
  899.        d_to In_Dirty_Passage,
  900.        n_to At_Y2;
  901.  
  902. Treasure -> "bars of silver"
  903.   with description "They're probably worth a fortune!",
  904.        initial "There are bars of silver here!",
  905.        article "some",
  906.        name "silver" "bars";
  907.  
  908.  
  909. Object In_South_Side_Chamber "In South Side Chamber"
  910.   with description
  911.                "You are in the south side chamber.",
  912.        n_to In_Hall_Of_Mt_King;
  913.  
  914. Treasure -> "precious jewelry"
  915.   with description "It's all quite exquisite!",
  916.        initial "There is precious jewelry here!",
  917.        article "some",
  918.        name "jewel" "jewels" "jewelry" "precious" "exquisite";
  919.  
  920.  
  921. Object In_West_Side_Chamber "In West Side Chamber"
  922.   with description
  923.                "You are in the west side chamber of the hall of 
  924.                the mountain king. A passage continues west and up here.",
  925.        w_to Crossover,
  926.        u_to Crossover,
  927.        e_to In_Hall_Of_Mt_King;
  928.  
  929. Treasure -> rare_coins "rare coins"
  930.   with description "They're a numismatist's dream!",
  931.        initial "There are many coins here!", article "many",
  932.        name "coins" "rare",
  933.   has  multitude;
  934.  
  935. ! ----------------------------------------------------------------------------
  936. !   The Y2 Rock Room and environs, slightly below
  937. ! ----------------------------------------------------------------------------
  938.  
  939. Object At_Y2 "At ~Y2~"
  940.   with description
  941.                "You are in a large room, with a passage to the 
  942.                south, a passage to the west, and a wall of broken 
  943.                rock to the east. There is a large ~Y2~ on 
  944.                a rock in the room's center.",
  945.        after
  946.        [; Look: if (random(100)<=25) print "^A hollow voice says, ~Plugh.~^";
  947.        ],
  948.        before
  949.        [;
  950.           Plugh: PlayerTo(Inside_Building); rtrue;
  951.           Plover: if (In_Plover_Room hasnt visited) rfalse;
  952.                   if (egg_sized_emerald in player)
  953.                   {   move egg_sized_emerald to In_Plover_Room;
  954.                       score = score - 5;
  955.                   }
  956.                   PlayerTo(In_Plover_Room); rtrue;
  957.        ],
  958.        s_to Low_N_S_Passage,
  959.        e_to Jumble_Of_Rock,
  960.        w_to At_Window_On_Pit_1;
  961.  
  962. Object -> "~Y2~ rock"
  963.   with description "There is a large ~Y2~ painted on the rock.",
  964.        name "rock" "y2"
  965.   has  scenery supporter;
  966.  
  967. Object Jumble_Of_Rock "Jumble of Rock"
  968.   with description "You are in a jumble of rock, with cracks everywhere.",
  969.        d_to At_Y2,
  970.        u_to In_Hall_Of_Mists;
  971.  
  972. Object At_Window_On_Pit_1 "At Window on Pit"
  973.   with description
  974.                "You're at a low window overlooking a huge pit, 
  975.                which extends up out of sight. A floor is 
  976.                indistinctly visible over 50 feet below. Traces of 
  977.                white mist cover the floor of the pit, becoming 
  978.                thicker to the right. Marks in the dust around the 
  979.                window would seem to indicate that someone has been 
  980.                here recently. Directly across the pit from you and 
  981.                25 feet away there is a similar window looking into a 
  982.                lighted room. A shadowy figure can be seen there 
  983.                peering back at you.",
  984.        before
  985.        [; WaveHands: "The shadowy figure waves back at you!";
  986.        ],
  987.        cant_go "The only passage is back east to Y2.",
  988.        e_to At_Y2;
  989.  
  990. Class PitScenery
  991.   with found_in  At_Window_On_Pit_1 At_Window_On_Pit_2,
  992.   has  scenery;
  993.  
  994. PitScenery "window"
  995.   with description
  996.               "It looks like a regular window.",
  997.        name "window" "low",
  998.   has  openable;
  999.  
  1000. PitScenery "huge pit"
  1001.   with description
  1002.               "It's so deep you can barely make out the floor below, 
  1003.                and the top isn't visible at all.",
  1004.        name "pit" "deep" "large";
  1005.  
  1006. PitScenery "marks in the dust"
  1007.   with description "Evidently you're not alone here.",
  1008.        name "marks" "dust"
  1009.   has  multitude;
  1010.  
  1011. PitScenery "shadowy figure"
  1012.   with description
  1013.               "The shadowy figure seems to be trying to attract 
  1014.                your attention.",
  1015.        name "figure" "shadow" "person" "individual" "shadowy" "mysterious";
  1016.  
  1017.  
  1018. Object In_Dirty_Passage "Dirty Passage"
  1019.   with description
  1020.                "You are in a dirty broken passage. To the east 
  1021.                is a crawl. To the west is a large passage. Above 
  1022.                you is a hole to another passage.",
  1023.        e_to On_Brink_Of_Pit,
  1024.        u_to Low_N_S_Passage,
  1025.        w_to In_Dusty_Rock_Room;
  1026.  
  1027. Object On_Brink_Of_Pit "Brink of Pit"
  1028.   with description
  1029.                "You are on the brink of a small clean climbable 
  1030.                pit. A crawl leads west.",
  1031.        w_to In_Dirty_Passage,
  1032.        d_to In_Pit,
  1033.        in_to In_Pit;
  1034.  
  1035. Object -> "small pit"
  1036.   with description "It looks like you might be able to climb down into it.",
  1037.        name "pit" "small" "clean" "climbable",
  1038.        before
  1039.        [; Climb, Enter: MovePlayer(d_obj); rtrue; ],
  1040.   has  scenery;
  1041.  
  1042.  
  1043. Object In_Pit "In Pit"
  1044.   with description
  1045.                "You are in the bottom of a small pit with a 
  1046.                little stream, which enters and exits through tiny 
  1047.                slits.",
  1048.        u_to On_Brink_Of_Pit,
  1049.        d_to "You don't fit through the tiny slits!"
  1050.   has  nodwarf;
  1051.  
  1052.  
  1053. Object -> "tiny slits"
  1054.   with description "The slits form a complex pattern in the rock.",
  1055.        name "slit" "slits" "tiny"
  1056.   has  scenery multitude;
  1057.  
  1058. Object In_Dusty_Rock_Room "In Dusty Rock Room"
  1059.   with description
  1060.                "You are in a large room full of dusty rocks. 
  1061.                There is a big hole in the floor. There are cracks 
  1062.                everywhere, and a passage leading east.",
  1063.        e_to In_Dirty_Passage,
  1064.        d_to At_Complex_Junction;
  1065.  
  1066. Object -> "dusty rocks"
  1067.   with description "They're just rocks. (Dusty ones, that is.)",
  1068.        name "rocks" "boulders" "stones" "rock" "boulder" "stone"
  1069.        "dusty" "dirty"
  1070.   has  scenery multitude;
  1071.  
  1072. ! ----------------------------------------------------------------------------
  1073. !   A maze of twisty little passages, all alike...
  1074. ! ----------------------------------------------------------------------------
  1075.  
  1076. Class  MazeRoom
  1077.   with short_name "Maze",
  1078.        description
  1079.            "You are in a maze of twisty little passages, all alike.",
  1080.        out_to "Easier said than done.";
  1081.  
  1082.  
  1083. MazeRoom Alike_Maze_1
  1084.   with 
  1085.        u_to At_West_End_Of_Hall_Of_Mists,
  1086.        n_to Alike_Maze_1,
  1087.        e_to Alike_Maze_2,
  1088.        s_to Alike_Maze_4,
  1089.        w_to Alike_Maze_11;
  1090.  
  1091. MazeRoom Alike_Maze_2
  1092.   with 
  1093.        w_to Alike_Maze_1,
  1094.        s_to Alike_Maze_3,
  1095.        e_to Alike_Maze_4;
  1096.  
  1097. MazeRoom Alike_Maze_3
  1098.   with 
  1099.        e_to Alike_Maze_2,
  1100.        d_to Dead_End_3,
  1101.        s_to Alike_Maze_6,
  1102.        n_to Dead_End_13;
  1103.  
  1104. MazeRoom Alike_Maze_4
  1105.   with 
  1106.        w_to Alike_Maze_1,
  1107.        n_to Alike_Maze_2,
  1108.        e_to Dead_End_1,
  1109.        s_to Dead_End_2,
  1110.        u_to Alike_Maze_14,
  1111.        d_to Alike_Maze_14;
  1112.  
  1113. MazeRoom Alike_Maze_5
  1114.   with 
  1115.        e_to Alike_Maze_6,
  1116.        w_to Alike_Maze_7;
  1117.  
  1118. MazeRoom Alike_Maze_6
  1119.   with 
  1120.        e_to Alike_Maze_3,
  1121.        w_to Alike_Maze_5,
  1122.        d_to Alike_Maze_7,
  1123.        s_to Alike_Maze_8;
  1124.  
  1125. DeadEndRoom Dead_End_1
  1126.   with 
  1127.        w_to Alike_Maze_4,
  1128.        out_to Alike_Maze_4;
  1129.  
  1130. DeadEndRoom Dead_End_2
  1131.   with 
  1132.        w_to Alike_Maze_4,
  1133.        out_to Alike_Maze_4;
  1134.  
  1135. DeadEndRoom Dead_End_3
  1136.   with 
  1137.        u_to Alike_Maze_3,
  1138.        out_to Alike_Maze_3;
  1139.  
  1140. MazeRoom Alike_Maze_7
  1141.   with 
  1142.        w_to Alike_Maze_5,
  1143.        u_to Alike_Maze_6,
  1144.        e_to Alike_Maze_8,
  1145.        s_to Alike_Maze_9;
  1146.  
  1147. MazeRoom Alike_Maze_8
  1148.   with 
  1149.        w_to Alike_Maze_6,
  1150.        e_to Alike_Maze_7,
  1151.        s_to Alike_Maze_8,
  1152.        u_to Alike_Maze_9,
  1153.        n_to Alike_Maze_10,
  1154.        d_to Dead_End_12;
  1155.  
  1156. MazeRoom Alike_Maze_9
  1157.   with 
  1158.        w_to Alike_Maze_7,
  1159.        n_to Alike_Maze_8,
  1160.        s_to Dead_End_4;
  1161.  
  1162. DeadEndRoom Dead_End_4
  1163.   with 
  1164.        w_to Alike_Maze_9,
  1165.        out_to Alike_Maze_9;
  1166.  
  1167. MazeRoom Alike_Maze_10
  1168.   with 
  1169.        w_to Alike_Maze_8,
  1170.        n_to Alike_Maze_10,
  1171.        d_to Dead_End_5,
  1172.        e_to At_Brink_Of_Pit;
  1173.  
  1174. DeadEndRoom Dead_End_5
  1175.   with 
  1176.        u_to Alike_Maze_10,
  1177.        out_to Alike_Maze_10;
  1178.  
  1179. Object At_Brink_Of_Pit "At Brink of Pit"
  1180.   with description
  1181.                "You are on the brink of a thirty foot pit with 
  1182.                a massive orange column down one wall. You could 
  1183.                climb down here but you could not get back up. The 
  1184.                maze continues at this level.",
  1185.        d_to In_Bird_Chamber,
  1186.        w_to Alike_Maze_10,
  1187.        s_to Dead_End_6,
  1188.        n_to Alike_Maze_12,
  1189.        e_to Alike_Maze_13;
  1190.  
  1191. Object -> "massive orange column"
  1192.   with description "It looks like you could climb down it.",
  1193.        name "column" "massive" "orange" "big" "huge",
  1194.        before [; Climb: MovePlayer(d_obj); rtrue; ],
  1195.   has  scenery;
  1196.  
  1197. Object -> "pit"
  1198.   with description "You'll have to climb down to find out anything more...",
  1199.        name "pit" "thirty" "foot" "thirty-foot",
  1200.        before [; Climb: MovePlayer(d_obj); rtrue; ],
  1201.   has  scenery;
  1202.  
  1203. DeadEndRoom Dead_End_6
  1204.   with e_to At_Brink_Of_Pit,
  1205.        out_to At_Brink_Of_Pit;
  1206.  
  1207. ! ----------------------------------------------------------------------------
  1208. !   A line of three vital junctions, east to west
  1209. ! ----------------------------------------------------------------------------
  1210.  
  1211. Object At_Complex_Junction "At Complex Junction"
  1212.   with description
  1213.                "You are at a complex junction. A low hands and 
  1214.                knees passage from the north joins a higher crawl 
  1215.                from the east to make a walking passage going west. 
  1216.                There is also a large room above. The air is damp 
  1217.                here.",
  1218.        u_to In_Dusty_Rock_Room,
  1219.        w_to In_Bedquilt,
  1220.        n_to In_Shell_Room,
  1221.        e_to In_Anteroom;
  1222.  
  1223. Object In_Bedquilt "Bedquilt"
  1224.   with description
  1225.                "You are in bedquilt, a long east/west passage 
  1226.                with holes everywhere. To explore at random select 
  1227.                north, south, up, or down.",
  1228.        e_to At_Complex_Junction,
  1229.        w_to In_Swiss_Cheese_Room,
  1230.        s_to In_Slab_Room,
  1231.        u_to In_Dusty_Rock_Room,
  1232.        n_to At_Junction_Of_Three,
  1233.        d_to In_Anteroom,
  1234.        before
  1235.        [ destiny;
  1236.          Go: if (noun==s_obj or d_obj && random(100)<=80) destiny=1;
  1237.              if (noun==u_obj && random(100)<=80) destiny=1;
  1238.              if (noun==u_obj && random(100)<=50)
  1239.                  destiny=In_Secret_N_S_Canyon_1;
  1240.              if (noun==n_obj && random(100)<=60) destiny=1;
  1241.              if (noun==n_obj && random(100)<=75)
  1242.                  destiny=In_Large_Low_Room;
  1243.              if (destiny==1)
  1244.                  "You have crawled around in some little holes and 
  1245.                   wound up back in the main passage.";
  1246.              if (destiny==0) rfalse;
  1247.              PlayerTo(destiny); rtrue;
  1248.        ];
  1249.  
  1250.  
  1251. Object In_Swiss_Cheese_Room "In Swiss Cheese Room"
  1252.   with description
  1253.                "You are in a room whose walls resemble swiss 
  1254.                cheese. Obvious passages go west, east, ne, and nw. 
  1255.                Part of the room is occupied by a large bedrock 
  1256.                block.",
  1257.        w_to At_East_End_Of_Twopit_Room,
  1258.        s_to In_Tall_E_W_Canyon,
  1259.        ne_to In_Bedquilt,
  1260.        nw_to In_Oriental_Room,
  1261.        e_to In_Soft_Room,
  1262.        before
  1263.        [; Go: if ((noun==s_obj && random(100) <= 80)
  1264.                   || (noun==nw_obj && random(100) <= 50))
  1265.               "You have crawled around in some little holes and 
  1266.                wound up back in the main passage.";
  1267.        ];
  1268.  
  1269.  
  1270. Object -> "bedrock block"
  1271.   with description "It's just a huge block.",
  1272.        name "block" "bedrock" "large",
  1273.        before [; LookUnder, Push, Pull, Take:
  1274.                   "Surely you're joking."; ],
  1275.   has  scenery;
  1276.  
  1277. ! ----------------------------------------------------------------------------
  1278. !   The Twopit Room area
  1279. ! ----------------------------------------------------------------------------
  1280. !   Possible heights for the plant:
  1281. ! ----------------------------------------------------------------------------
  1282. Constant TINY_P = 0;
  1283. Constant TALL_P = 1;
  1284. Constant HUGE_P = 2;
  1285.  
  1286. Object At_West_End_Of_Twopit_Room "At West End of Twopit Room"
  1287.   with description
  1288.                "You are at the west end of the twopit room. 
  1289.                There is a large hole in the wall above the pit at 
  1290.                this end of the room.",
  1291.        e_to At_East_End_Of_Twopit_Room,
  1292.        w_to In_Slab_Room,
  1293.        d_to In_West_Pit,
  1294.        u_to "It is too far up for you to reach.",
  1295.        before
  1296.        [; Enter: if (noun==HoleAbovePit_1)
  1297.               "It is too far up for you to reach.";
  1298.        ];
  1299.  
  1300. Object PlantStickingUp "beanstalk"
  1301.   with found_in  At_West_End_Of_Twopit_Room  At_East_End_Of_Twopit_Room,
  1302.        name "plant" "beanstalk" "stalk"
  1303.             "bean" "giant" "tiny" "little" "murmuring"
  1304.             "twelve" "foot" "tall" "bellowing",
  1305.        describe
  1306.        [;  if (Plant.height == TALL_P)
  1307.                "The top of a 12-foot-tall beanstalk is 
  1308.                 poking out of the west pit.";
  1309.            "There is a huge beanstalk growing out of the 
  1310.             west pit up to the hole.";
  1311.        ],
  1312.        before
  1313.        [; Examine: RunRoutines(self,describe); rtrue;
  1314.           Climb: if (Plant.height==HUGE_P) <<Climb Plant>>;
  1315.        ],
  1316.   has  absent static;
  1317.  
  1318. Object HoleAbovePit_1 "hole above pit"
  1319.   with description
  1320.                "The hole is in the wall above the pit at 
  1321.                this end of the room.",
  1322.        name "hole" "large" "above" "pit",
  1323.        found_in In_West_Pit At_West_End_Of_Twopit_Room
  1324.   has  scenery;
  1325.  
  1326.  
  1327. Object In_West_Pit "In West Pit"
  1328.   with description
  1329.                "You are at the bottom of the western pit in the 
  1330.                twopit room. There is a large hole in the wall about 
  1331.                25 feet above you.",
  1332.        before
  1333.        [; Climb:
  1334.            if (noun==Plant) rfalse;
  1335.            if (Plant.height == TINY_P)
  1336.                "There is nothing here to climb. Use ~up~ 
  1337.                 or ~out~ to leave the pit.";
  1338.        ],
  1339.        u_to At_West_End_Of_Twopit_Room
  1340.   has  nodwarf;
  1341.  
  1342. Object -> Plant "plant"
  1343.   with height TINY_P,
  1344.        name "plant" "beanstalk" "stalk"
  1345.             "bean" "giant" "tiny" "little" "murmuring"
  1346.             "twelve" "foot" "tall" "bellowing",
  1347.        describe
  1348.        [; switch(self.height)
  1349.           {   TINY_P:
  1350.                   "There is a tiny little plant in the pit, 
  1351.                    murmuring ~Water, water, ...~";
  1352.               TALL_P:
  1353.                   "There is a 12-foot-tall beanstalk stretching 
  1354.                    up out of the pit, bellowing ~Water!! Water!!~";
  1355.               HUGE_P:
  1356.                   "There is a gigantic beanstalk stretching all 
  1357.                    the way up to the hole.";
  1358.           }
  1359.        ],
  1360.        before
  1361.        [;
  1362.          Climb: switch(self.height)
  1363.                 {   TINY_P: "It's just a little plant!";
  1364.                     TALL_P:
  1365.                         print "You have climbed up the plant
  1366.                                and out of the pit.^";
  1367.                         PlayerTo(At_West_End_Of_Twopit_Room); rtrue;
  1368.                     HUGE_P:
  1369.                         print "You clamber up the plant and scurry through 
  1370.                                the hole at the top.^";
  1371.                         PlayerTo(In_Narrow_Corridor); rtrue;
  1372.                 }
  1373.          Take:  "The plant has exceptionally deep roots and 
  1374.                  cannot be pulled free.";
  1375.          Water: if (bottle notin player)
  1376.                     "You have nothing to water the plant with.";
  1377.  
  1378.                 switch(child(bottle))
  1379.                 {   nothing: "The bottle is empty.";
  1380.                     oil_in_the_bottle:
  1381.                     remove oil_in_the_bottle;
  1382.                    "The plant indignantly shakes the oil 
  1383.                     off its leaves and asks, ~Water?~";
  1384.                 }
  1385.                 remove water_in_the_bottle;
  1386.  
  1387.                 switch((self.height)++)
  1388.                 {   TINY_P:
  1389.                         print "The plant spurts into furious growth for a 
  1390.                         few seconds.^^";
  1391.                         give PlantStickingUp ~absent;
  1392.                     TALL_P:
  1393.                         print "The plant grows explosively, almost filling 
  1394.                         the bottom of the pit.^^";
  1395.                     HUGE_P:
  1396.                         print "You've over-watered the plant! It's 
  1397.                         shriveling up! It's, it's...^^";
  1398.                         give PlantStickingUp absent; remove PlantStickingUp;
  1399.                         self.height = TINY_P;
  1400.                 }
  1401.                 <<Examine self>>;
  1402.          Oil:   <<Water self>>;
  1403.          Examine: self.describe(); rtrue;
  1404.        ];
  1405.        
  1406.  
  1407. Object At_East_End_Of_Twopit_Room "At East End of Twopit Room"
  1408.   with description
  1409.                "You are at the east end of the twopit room. 
  1410.                The floor here is littered with thin rock slabs, 
  1411.                which make it easy to descend the pits. There is a 
  1412.                path here bypassing the pits to connect passages from 
  1413.                east and west. There are holes all over, but the 
  1414.                only big one is on the wall directly over the west 
  1415.                pit where you can't get to it.",
  1416.        e_to In_Swiss_Cheese_Room,
  1417.        w_to At_West_End_Of_Twopit_Room,
  1418.        d_to In_East_Pit;
  1419.  
  1420.  
  1421. Object -> "thin rock slabs"
  1422.   with 
  1423.        description "They almost form natural stairs down into the pit.",
  1424.        name "slabs" "slab" "rocks" "stairs" "thin" "rock",
  1425.        before
  1426.        [; LookUnder, Push, Pull, Take: "Surely you're joking.";
  1427.        ],
  1428.   has  scenery multitude;
  1429.  
  1430.  
  1431. Object In_East_Pit "In East Pit"
  1432.   with description
  1433.                "You are at the bottom of the eastern pit in the 
  1434.                twopit room. There is a small pool of oil in one 
  1435.                corner of the pit.",
  1436.        u_to At_East_End_Of_Twopit_Room
  1437.   has  nodwarf;
  1438.  
  1439. Object -> Oil "pool of oil"
  1440.   with name "pool" "oil" "small",
  1441.        description "It looks like ordinary oil.",
  1442.        before
  1443.        [; Drink:  "Absolutely not.";
  1444.           Take:   if (bottle notin player)
  1445.                       "You have nothing in which to carry the oil.";
  1446.                   <<Fill bottle>>;
  1447.           Insert: if (second == bottle) <<Fill bottle>>;
  1448.                       "You have nothing in which to carry the oil.";
  1449.        ],
  1450.   has  scenery;
  1451.  
  1452. Object "hole above pit"
  1453.   with description
  1454.                "The hole is in the wall above you.",
  1455.        name "hole" "large" "above" "pit",
  1456.        found_in In_East_Pit At_East_End_Of_Twopit_Room
  1457.   has  scenery;
  1458.  
  1459.  
  1460. Object In_Slab_Room "Slab Room"
  1461.   with description
  1462.                "You are in a large low circular chamber whose 
  1463.                floor is an immense slab fallen from the ceiling 
  1464.                (slab room). East and west there once were large 
  1465.                passages, but they are now filled with boulders. Low 
  1466.                small passages go north and south, and the south one 
  1467.                quickly bends west around the boulders.",
  1468.        s_to At_West_End_Of_Twopit_Room,
  1469.        u_to In_Secret_N_S_Canyon_0,
  1470.        n_to In_Bedquilt;
  1471.  
  1472. Object -> "slab"
  1473.   with description "It is now the floor here.",
  1474.        name "slab" "immense",
  1475.        before [; LookUnder, Push, Pull, Take:
  1476.                   "Surely you're joking."; ],
  1477.   has  scenery;
  1478.  
  1479. Object -> "boulders"
  1480.   with description "They're just ordinary boulders.",
  1481.        name "boulder" "boulders" "rocks" "stones"
  1482.   has  scenery multitude;
  1483.  
  1484. ! ----------------------------------------------------------------------------
  1485. !   A small network of Canyons, mainly Secret
  1486. ! ----------------------------------------------------------------------------
  1487.  
  1488. Object In_Secret_N_S_Canyon_0 "Secret N/S Canyon"
  1489.   with description
  1490.                "You are in a secret N/S canyon above a large 
  1491.                room.",
  1492.        d_to In_Slab_Room,
  1493.        s_to In_Secret_Canyon,
  1494.        n_to In_Mirror_Canyon,
  1495.        before
  1496.        [; Go: if (noun==s_obj) canyon_from=self;
  1497.        ];
  1498.  
  1499. Object In_Secret_N_S_Canyon_1 "Secret N/S Canyon"
  1500.   with description
  1501.                "You are in a secret N/S canyon above a sizable passage.",
  1502.        n_to At_Junction_Of_Three,
  1503.        d_to In_Bedquilt,
  1504.        s_to Atop_Stalactite;
  1505.  
  1506. Object At_Junction_Of_Three
  1507.        "Junction of Three Secret Canyons"
  1508.   with description
  1509.                "You are in a secret canyon at a junction of 
  1510.                three canyons, bearing north, south, and se. The 
  1511.                north one is as tall as the other two combined.",
  1512.        se_to In_Bedquilt,
  1513.        s_to In_Secret_N_S_Canyon_1,
  1514.        n_to At_Window_On_Pit_2;
  1515.  
  1516.  
  1517. Object In_Large_Low_Room "Large Low Room"
  1518.   with description
  1519.                "You are in a large low room. Crawls lead 
  1520.                north, se, and sw.",
  1521.        sw_to In_Sloping_Corridor,
  1522.        se_to In_Oriental_Room,
  1523.        n_to Dead_End_Crawl;
  1524.  
  1525. Object Dead_End_Crawl "Dead End Crawl"
  1526.   with description
  1527.                "This is a dead end crawl.",
  1528.        s_to In_Large_Low_Room,
  1529.        out_to In_Large_Low_Room;
  1530.  
  1531.  
  1532. Object In_Secret_E_W_Canyon "Secret E/W Canyon Above Tight Canyon"
  1533.   with description
  1534.                "You are in a secret canyon which here runs E/W. 
  1535.                It crosses over a very tight canyon 15 feet below. 
  1536.                If you go down you may not be able to get back up.",
  1537.        e_to In_Hall_Of_Mt_King,
  1538.        w_to In_Secret_Canyon,
  1539.        before
  1540.        [; Go: if (noun==w_obj) canyon_from=self;
  1541.        ],
  1542.        d_to In_N_S_Canyon;
  1543.  
  1544. Object In_N_S_Canyon "N/S Canyon"
  1545.   with description
  1546.                "You are at a wide place in a very tight N/S canyon.",
  1547.        s_to Canyon_Dead_End,
  1548.        n_to In_Tall_E_W_Canyon;
  1549.  
  1550. Object Canyon_Dead_End "Canyon Dead End"
  1551.   with description
  1552.                "The canyon here becomes too tight to go further south.",
  1553.        n_to In_N_S_Canyon;
  1554.  
  1555. Object In_Tall_E_W_Canyon "In Tall E/W Canyon"
  1556.   with description
  1557.                "You are in a tall E/W canyon. A low tight 
  1558.                crawl goes 3 feet north and seems to open up.",
  1559.        e_to In_N_S_Canyon,
  1560.        w_to Dead_End_8,
  1561.        n_to In_Swiss_Cheese_Room;
  1562.  
  1563. Object Atop_Stalactite "Atop Stalactite"
  1564.   with description
  1565.                "A large stalactite extends from the roof and 
  1566.                almost reaches the floor below. You could climb down 
  1567.                it, and jump from it to the floor, but having done so 
  1568.                you would be unable to reach it to climb back up.",
  1569.        n_to In_Secret_N_S_Canyon_1,
  1570.        d_to
  1571.        [; if (random(100) <= 40) return Alike_Maze_6;
  1572.           if (random(100) <= 50) return Alike_Maze_9;
  1573.           return Alike_Maze_4;
  1574.        ],
  1575.        before
  1576.        [; Jump, Climb: <<Go d_obj>>;
  1577.        ];
  1578.  
  1579.  
  1580. Object -> "stalactite"
  1581.   with description
  1582.                "You could probably climb down it, but you can forget 
  1583.                coming back up.",
  1584.        name "stalactite" "stalagmite" "stalagtite" "large",
  1585.        before
  1586.        [; LookUnder, Push, Take: "Do get a grip on yourself.";
  1587.        ],
  1588.   has  scenery;
  1589.  
  1590. ! ----------------------------------------------------------------------------
  1591. !   Here be dragons
  1592. ! ----------------------------------------------------------------------------
  1593.  
  1594. Object In_Secret_Canyon "Secret Canyon"
  1595.   with description
  1596.                "You are in a secret canyon which exits to the 
  1597.                north and east.",
  1598.        e_to 
  1599.        [; if (canyon_from == In_Secret_E_W_Canyon) return canyon_from;
  1600.           if (Dragon in location)
  1601.               "The dragon looks rather nasty. You'd best not try to get by.";
  1602.           return In_Secret_E_W_Canyon;
  1603.        ],
  1604.        n_to
  1605.        [; if (canyon_from == In_Secret_N_S_Canyon_0) return canyon_from;
  1606.           if (Dragon in location)
  1607.               "The dragon looks rather nasty. You'd best not try to get by.";
  1608.           return In_Secret_N_S_Canyon_0;
  1609.        ],
  1610.        out_to
  1611.        [; return canyon_from;
  1612.        ],
  1613.        before
  1614.        [; if (action==##Yes && Dragon has general)
  1615.           {   remove Dragon; move DragonCorpse to location;
  1616.               give Dragon ~general;
  1617.               "Congratulations! You have just vanquished a 
  1618.                dragon with your bare hands! (Unbelievable, 
  1619.                isn't it?)";
  1620.           }
  1621.           if (action==##No && Dragon has general)
  1622.           {   give Dragon ~general;
  1623.               "I should think not.";
  1624.           }
  1625.           give Dragon ~general;
  1626.        ];
  1627.  
  1628. Object -> Dragon "dragon"
  1629.   with description "I wouldn't mess with it if I were you.",
  1630.        name "dragon" "monster" "beast" "lizard"
  1631.             "huge" "green" "fierce" "scaly" "giant" "ferocious",
  1632.        initial "A huge green fierce dragon bars the way!",
  1633.        life
  1634.        [; Attack:  give Dragon general; "With what? Your bare hands?";
  1635.           Give:    "The dragon is implacable.";
  1636.           ThrowAt: if (noun~=axe)
  1637.                        "You'd probably be better off using your 
  1638.                        bare hands than that thing!";
  1639.                    move axe to location;
  1640.                    "The axe bounces harmlessly off the dragon's 
  1641.                     thick scales.";
  1642.        ],
  1643.   has  animate;
  1644.  
  1645. Treasure -> "Persian rug"
  1646.   with name "rug" "persian" "persian" "fine" "finest" "dragon^s",
  1647.        depositpoints 14,
  1648.        before
  1649.        [; Take: if (Dragon in location)
  1650.                 "You'll need to get the dragon to move first!";
  1651.        ],
  1652.        describe
  1653.        [; if (Dragon in location)
  1654.              "The dragon is sprawled out on the Persian rug!";
  1655.           "The Persian rug is spread out on the floor here.";
  1656.        ];
  1657.  
  1658. Object DragonCorpse "dragon's body"
  1659.   with initial
  1660.             "The body of a huge green dead dragon is lying off to one side.",
  1661.        name "dragon" "corpse" "dead" "dragon^s" "body",
  1662.        before
  1663.        [; Attack: "You've already done enough damage!";
  1664.        ],
  1665.   has  static;
  1666.  
  1667. ! ----------------------------------------------------------------------------
  1668. !   And more of the Alike Maze
  1669. ! ----------------------------------------------------------------------------
  1670.  
  1671. DeadEndRoom Dead_End_8
  1672.   with description "The canyon runs into a mass of boulders -- dead end.",
  1673.        s_to In_Tall_E_W_Canyon,
  1674.        out_to In_Tall_E_W_Canyon;
  1675.  
  1676. MazeRoom Alike_Maze_11
  1677.   with 
  1678.        n_to Alike_Maze_1,
  1679.        w_to Alike_Maze_11,
  1680.        s_to Alike_Maze_11,
  1681.        e_to Dead_End_9,
  1682.        ne_to Dead_End_10;
  1683.  
  1684. DeadEndRoom Dead_End_9
  1685.   with w_to Alike_Maze_11,
  1686.        out_to Alike_Maze_11;
  1687.  
  1688. DeadEndRoom Dead_End_10
  1689.   with 
  1690.        s_to Alike_Maze_3,
  1691.        out_to Alike_Maze_3;
  1692.  
  1693. MazeRoom Alike_Maze_12
  1694.   with 
  1695.        s_to At_Brink_Of_Pit,
  1696.        e_to Alike_Maze_13,
  1697.        w_to Dead_End_11;
  1698.  
  1699. MazeRoom Alike_Maze_13
  1700.   with 
  1701.        n_to At_Brink_Of_Pit,
  1702.        w_to Alike_Maze_12,
  1703.        nw_to Dead_End_13;
  1704.  
  1705. DeadEndRoom Dead_End_11
  1706.   with 
  1707.        e_to Alike_Maze_12,
  1708.        out_to Alike_Maze_12;
  1709.  
  1710. DeadEndRoom Dead_End_12
  1711.   with 
  1712.        u_to Alike_Maze_8,
  1713.        out_to Alike_Maze_8;
  1714.  
  1715. MazeRoom Alike_Maze_14
  1716.   with 
  1717.        u_to Alike_Maze_4,
  1718.        d_to Alike_Maze_4;
  1719.  
  1720. DeadEndRoom Dead_End_13
  1721.   with se_to Alike_Maze_13,
  1722.        out_to Alike_Maze_13,
  1723.        description "This is the pirate's dead end.",
  1724.        initial
  1725.        [;
  1726.           StopDaemon(Pirate);
  1727.           if (treasure_chest in self && treasure_chest hasnt moved)
  1728.               "You've found the pirate's treasure chest!";
  1729.        ],
  1730.   has  nodwarf;
  1731.  
  1732. Treasure -> treasure_chest "treasure chest"
  1733.   with depositpoints 12,
  1734.        description "It's the pirate's treasure chest, filled with 
  1735.                     riches of all kinds!",
  1736.        initial "The pirate's treasure chest is here!",
  1737.        name "chest" "box" "treasure" "riches" "pirate" "pirate^s" "treasure";
  1738.  
  1739. ! ----------------------------------------------------------------------------
  1740. !   Above the beanstalk: the Giant Room and the Waterfall
  1741. ! ----------------------------------------------------------------------------
  1742.  
  1743. Object In_Narrow_Corridor "In Narrow Corridor"
  1744.   with description
  1745.                "You are in a long, narrow corridor stretching 
  1746.                out of sight to the west. At the eastern end is a 
  1747.                hole through which you can see a profusion of 
  1748.                leaves.",
  1749.        d_to In_West_Pit,
  1750.        w_to In_Giant_Room,
  1751.        e_to In_West_Pit,
  1752.        before
  1753.        [; Jump: deadflag=1; "You fall and break your neck!";
  1754.        ];
  1755.  
  1756. Object -> "leaves"
  1757.   with description
  1758.                "The leaves appear to be attached to the beanstalk 
  1759.                you climbed to get here.", article "some",
  1760.        name "leaf" "leaves" "plant" "tree" "stalk" "beanstalk" "profusion",
  1761.        before
  1762.        [;  Count: "69,105.";  ! (I thank Rene Schnoor for counting them)
  1763.        ],
  1764.   has  scenery;
  1765.  
  1766.  
  1767. Object At_Steep_Incline "Steep Incline Above Large Room"
  1768.   with description
  1769.                "You are at the top of a steep incline above a 
  1770.                large room. You could climb down here, but you would 
  1771.                not be able to climb up. There is a passage leading 
  1772.                back to the north.",
  1773.        n_to In_Cavern_With_Waterfall,
  1774.        d_to In_Large_Low_Room;
  1775.  
  1776. Object In_Giant_Room "Giant Room"
  1777.   with description
  1778.                "You are in the giant room. The ceiling here is 
  1779.                too high up for your lamp to show it. Cavernous 
  1780.                passages lead east, north, and south. On the west 
  1781.                wall is scrawled the inscription, ~Fee fie foe foo~ 
  1782.                [sic].",
  1783.        s_to In_Narrow_Corridor,
  1784.        e_to At_Recent_Cave_In,
  1785.        n_to In_Immense_N_S_Passage;
  1786.  
  1787. Object -> "scrawled inscription"
  1788.   with description "It says, ~Fee fie foe foo [sic].~",
  1789.        name "inscription" "writing" "scrawl" "scrawled"
  1790.   has  scenery;
  1791.  
  1792. Treasure -> golden_eggs "nest of golden eggs"
  1793.   with depositpoints 14,
  1794.        description "The nest is filled with beautiful golden eggs!",
  1795.        initial "There is a large nest here, full of golden eggs!",
  1796.        name "eggs" "egg" "nest" "golden" "beautiful",
  1797.   has  multitude;
  1798.  
  1799.  
  1800. Object At_Recent_Cave_In "Recent Cave-in"
  1801.   with description
  1802.                "The passage here is blocked by a recent 
  1803.                cave-in.",
  1804.        s_to In_Giant_Room;
  1805.  
  1806.  
  1807. Object In_Immense_N_S_Passage "Immense N/S Passage"
  1808.   with description "You are at one end of an immense north/south passage.",
  1809.        s_to In_Giant_Room,
  1810.        n_to 
  1811.        [; if (RustyDoor has locked) <<Open RustyDoor>>;
  1812.           if (RustyDoor hasnt open)
  1813.           { give RustyDoor open; print "(first wrenching the door open)^"; }
  1814.           return RustyDoor;
  1815.        ];
  1816.  
  1817. Object -> RustyDoor "rusty door"
  1818.   with description "It's just a big iron door.",
  1819.        name "door" "hinge" "hinges" "massive" "rusty" "iron",
  1820.        when_closed "The way north is barred by a massive, rusty, iron door.",
  1821.        when_open   "The way north leads through a massive, rusty, iron door.",
  1822.        door_to In_Cavern_With_Waterfall,
  1823.        door_dir n_to,
  1824.        before
  1825.        [; Open:  if (RustyDoor has locked)
  1826.                     "The hinges are quite thoroughly rusted now 
  1827.                                and won't budge.";
  1828.           Close: if (RustyDoor has open)
  1829.                     "With all the effort it took to get the door 
  1830.                                open, I wouldn't suggest closing it again.";
  1831.                  "No problem there -- it already is.";
  1832.           Oil:   if (bottle in player && oil_in_the_bottle in bottle)
  1833.                  {   remove oil_in_the_bottle;
  1834.                      give RustyDoor ~locked openable;
  1835.                      "The oil has freed up the hinges so that the 
  1836.                       door will now move, although it requires some 
  1837.                       effort.";
  1838.                  }
  1839.                  else
  1840.                      "You have nothing to oil it with.";
  1841.           Water: if (bottle in player && water_in_the_bottle in bottle)
  1842.                  {   remove water_in_the_bottle; give RustyDoor locked ~open;
  1843.                      "The hinges are quite thoroughly 
  1844.                       rusted now and won't budge.";
  1845.                  }
  1846.                  else
  1847.                      "You have nothing to water it with.";
  1848.        ],
  1849.        after
  1850.        [; Open: "The door heaves open with a shower of rust.";
  1851.        ],
  1852.   has  static door locked;
  1853.  
  1854.  
  1855.  
  1856. Object In_Cavern_With_Waterfall "In Cavern With Waterfall"
  1857.   with description
  1858.                "You are in a magnificent cavern with a rushing 
  1859.                stream, which cascades over a sparkling waterfall 
  1860.                into a roaring whirlpool which disappears through a 
  1861.                hole in the floor. Passages exit to the south and 
  1862.                west.",
  1863.        s_to In_Immense_N_S_Passage,
  1864.        w_to At_Steep_Incline;
  1865.  
  1866. Object -> "waterfall"
  1867.   with description "Wouldn't want to go down in in a barrel!",
  1868.        name "waterfall" "whirlpool" "sparkling" "whirling"
  1869.   has  scenery;
  1870.  
  1871. Treasure -> trident "jeweled trident"
  1872.   with description "The trident is covered with fabulous jewels!",
  1873.        initial "There is a jewel-encrusted trident here!",
  1874.        name "trident" "jeweled" "jewel-encrusted" "encrusted" "fabulous",
  1875.        depositpoints 14;
  1876.  
  1877. ! ----------------------------------------------------------------------------
  1878. !   The caves around Bedquilt
  1879. ! ----------------------------------------------------------------------------
  1880.  
  1881. Object In_Soft_Room "In Soft Room"
  1882.   with description
  1883.                "You are in the soft room. The walls are 
  1884.                covered with heavy curtains, the floor with a thick 
  1885.                pile carpet. Moss covers the ceiling.",
  1886.        w_to In_Swiss_Cheese_Room;
  1887.  
  1888. Object -> "carpet"
  1889.   with description "The carpet is quite plush.",
  1890.        name "carpet" "shag" "pile" "heavy" "thick"
  1891.   has  scenery;
  1892.  
  1893. Object -> "curtains"
  1894.   with description "They seem to absorb sound very well.",
  1895.        name "curtain" "curtains" "heavy" "thick",
  1896.        before
  1897.        [; Take: "Now don't go ripping up the place!";
  1898.           LookUnder, Search:
  1899.             "You don't find anything exciting behind the curtains.";
  1900.        ],
  1901.   has  scenery;
  1902.  
  1903. Object -> "moss"
  1904.   with description "It just looks like your typical, everyday moss.",
  1905.        name "moss" "typical" "everyday",
  1906.        before
  1907.        [;  Take: "It crumbles to nothing in your hands.";
  1908.        ],
  1909.   has  scenery edible;
  1910.  
  1911. Object -> velvet_pillow "velvet pillow" 
  1912.   with description "It's just a small velvet pillow.",
  1913.        initial "A small velvet pillow lies on the floor.",
  1914.        name "pillow" "velvet" "small";
  1915.  
  1916.  
  1917. Object In_Oriental_Room "Oriental Room"
  1918.   with description
  1919.                "This is the oriental room. Ancient oriental 
  1920.                cave drawings cover the walls. A gently sloping 
  1921.                passage leads upward to the north, another passage 
  1922.                leads se, and a hands and knees crawl leads west.",
  1923.        w_to In_Large_Low_Room,
  1924.        se_to In_Swiss_Cheese_Room,
  1925.        u_to In_Misty_Cavern,
  1926.        n_to In_Misty_Cavern;
  1927.  
  1928. Object -> "ancient oriental drawings"
  1929.   with description "They seem to depict people and animals.",
  1930.        name "paintings" "drawings" "art" "cave" "ancient" "oriental"
  1931.   has  scenery multitude;
  1932.  
  1933. Treasure -> ming_vase "ming vase"
  1934.   with description "It's a delicate, precious, ming vase!",
  1935.        name "vase" "ming" "delicate",
  1936.        depositpoints 14,
  1937.        after
  1938.        [; Drop: if (velvet_pillow in location)
  1939.                 {   print "(coming to rest, delicately, on the velvet pillow)^";
  1940.                     rfalse;
  1941.                 }
  1942.                 remove ming_vase; move shards to location;
  1943.                 "The ming vase drops with a delicate crash.";
  1944.        ],
  1945.        before
  1946.        [; Attack: remove ming_vase; move shards to location;
  1947.                 "You have taken the vase and 
  1948.                  hurled it delicately to the ground.";
  1949.           Receive: "The vase is too fragile to use as a container.";
  1950.        ];
  1951.  
  1952.  
  1953. Object shards "some worthless shards of pottery"
  1954.   with initial "The floor is littered with worthless shards of pottery.",
  1955.        description "They look to be the remains of what was once a 
  1956.                     beautiful vase. I guess some oaf must have dropped it.",
  1957.        name "pottery" "shards" "remains" "vase" "worthless",
  1958.   has  multitude;
  1959.  
  1960.  
  1961. Object In_Misty_Cavern "Misty Cavern"
  1962.   with description
  1963.                "You are following a wide path around the outer 
  1964.                edge of a large cavern. Far below, through a heavy 
  1965.                white mist, strange splashing noises can be heard. 
  1966.                The mist rises up through a fissure in the ceiling. 
  1967.                The path exits to the south and west.",
  1968.        s_to In_Oriental_Room,
  1969.        w_to In_Alcove;
  1970.  
  1971. Object -> "fissure"
  1972.   with description "You can't really get close enough to examine it.",
  1973.        name "fissure" "ceiling"
  1974.   has  scenery;
  1975.  
  1976. ! ----------------------------------------------------------------------------
  1977. !   Plovers and pyramids
  1978. ! ----------------------------------------------------------------------------
  1979.  
  1980. Object In_Alcove "Alcove"
  1981.   with description
  1982.                "You are in an alcove. A small northwest path seems 
  1983.                to widen after a short distance. An extremely tight 
  1984.                tunnel leads east. It looks like a very tight 
  1985.                squeeze. An eerie light can be seen at the other 
  1986.                end.",
  1987.        nw_to In_Misty_Cavern,
  1988.        e_to
  1989.        [ j; j=children(player);
  1990.          if (j==0 || (j==1 && egg_sized_emerald in player))
  1991.              return In_Plover_Room;
  1992.          "Something you're carrying won't fit through the 
  1993.           tunnel with you. You'd best take inventory and drop 
  1994.           something.";
  1995.        ];
  1996.  
  1997.  
  1998. Object In_Plover_Room "Plover Room"
  1999.   with description
  2000.                "You're in a small chamber lit by an eerie green 
  2001.                light. An extremely narrow tunnel exits to the west. 
  2002.                A dark corridor leads northeast.",
  2003.        ne_to In_Dark_Room,
  2004.        w_to
  2005.        [ j; j=children(player);
  2006.          if (j==0 || (j==1 && egg_sized_emerald in player))
  2007.              return In_Alcove;
  2008.          "Something you're carrying won't fit through the 
  2009.           tunnel with you. You'd best take inventory and drop 
  2010.           something.";
  2011.        ],
  2012.        before
  2013.        [; Plover: if (egg_sized_emerald in player)
  2014.                   move egg_sized_emerald to In_Plover_Room;
  2015.                   PlayerTo(At_Y2); rtrue;
  2016.           Go: if (noun==out_obj) <<Go w_obj>>;
  2017.        ],
  2018.   has  light;
  2019.  
  2020. Treasure -> egg_sized_emerald "emerald the size of a plover's egg"
  2021.   with depositpoints 14, article "an",
  2022.        description "Plover's eggs, by the way, are quite large.",
  2023.        initial "There is an emerald here the size of a plover's egg!",
  2024.        name "emerald" "egg-sized" "egg" "sized" "plover^s";
  2025.  
  2026.  
  2027. Object In_Dark_Room "The Dark Room"
  2028.   with description
  2029.                "You're in the dark-room. A corridor leading 
  2030.                south is the only exit.",
  2031.        s_to In_Plover_Room
  2032.   has  nodwarf;
  2033.  
  2034. Object -> "stone tablet"
  2035.   with initial
  2036.                "A massive stone tablet imbedded in the wall reads: 
  2037.                ~Congratulations on bringing light into the 
  2038.                dark-room!~",
  2039.        name "tablet" "massive" "stone"
  2040.   has  static;
  2041.  
  2042. Treasure -> "platinum pyramid"
  2043.   with initial "There is a platinum pyramid here, 8 inches on a side!",
  2044.        depositpoints 14,
  2045.        description "The platinum pyramid is 8 inches on a side!",
  2046.        name "platinum" "pyramid" "platinum" "pyramidal";
  2047.  
  2048. ! ----------------------------------------------------------------------------
  2049. !   North of the complex junction: a long up-down corridor
  2050. ! ----------------------------------------------------------------------------
  2051.  
  2052. Object In_Arched_Hall "Arched Hall"
  2053.   with description
  2054.                "You are in an arched hall. A coral passage 
  2055.                once continued up and east from here, but is now 
  2056.                blocked by debris. The air smells of sea water.",
  2057.        d_to In_Shell_Room;
  2058.  
  2059. Object In_Shell_Room "Shell Room"
  2060.   with description
  2061.                "You're in a large room carved out of 
  2062.                sedimentary rock. The floor and walls are littered 
  2063.                with bits of shells imbedded in the stone. A shallow 
  2064.                passage proceeds downward, and a somewhat steeper one 
  2065.                leads up. A low hands and knees passage enters from 
  2066.                the south.",
  2067.        u_to In_Arched_Hall,
  2068.        d_to In_Ragged_Corridor,
  2069.        s_to
  2070.        [; if (giant_bivalve in player)
  2071.           {   if (giant_bivalve has open)
  2072.                   "You can't fit this five-foot oyster 
  2073.                    through that little passage!";
  2074.               else
  2075.                   "You can't fit this five-foot clam 
  2076.                    through that little passage!";
  2077.           }
  2078.           return At_Complex_Junction;
  2079.        ];
  2080.  
  2081.  
  2082. Object -> giant_bivalve "giant clam"
  2083.   with name "giant" "clam" "oyster" "bivalve",
  2084.        describe
  2085.        [; if (self has general)
  2086.               "There is an enormous oyster here with its shell tightly closed.";
  2087.           "There is an enormous clam here with its shell tightly closed.";
  2088.        ],
  2089.        before
  2090.        [; Examine: if (location==At_Ne_End or At_Sw_End)
  2091.                 "Interesting. There seems to be something written on the 
  2092.                 underside of the oyster:^^
  2093.                 ~There is something strange about this 
  2094.                 place, such that one of the words I've always known 
  2095.                 now has a new effect.~";
  2096.                 "A giant bivalve of some kind.";
  2097.           Open:
  2098.                 "You aren't strong enough to open the clam 
  2099.                  with your bare hands.";
  2100.           Unlock:
  2101.                 if (second~=trident)
  2102.                     print (The) trident,
  2103.                        " isn't strong enough to open the clam.";
  2104.                 if (self has general)
  2105.                     "The oyster creaks open, revealing nothing 
  2106.                     but oyster inside. It promptly snaps shut 
  2107.                     again.";  
  2108.                 give self general; move pearl to In_A_Cul_De_Sac;
  2109.                 "A glistening pearl falls out of the clam and 
  2110.                  rolls away. Goodness, this must really be an 
  2111.                  oyster. (I never was very good at 
  2112.                  identifying bivalves.)  Whatever it is, it 
  2113.                  has now snapped shut again.";
  2114.           Attack:
  2115.                 "The shell is very strong and is impervious to attack.";
  2116.        ];
  2117.  
  2118. Treasure pearl "glistening pearl"
  2119.   with description "It's incredibly large!",
  2120.        initial "Off to one side lies a glistening pearl!",
  2121.        name "pearl" "glistening" "incredible" "incredibly" "large",
  2122.        depositpoints 14;
  2123.  
  2124.  
  2125. Object In_Ragged_Corridor "Ragged Corridor"
  2126.   with description
  2127.                "You are in a long sloping corridor with ragged 
  2128.                sharp walls.",
  2129.        u_to In_Shell_Room,
  2130.        d_to In_A_Cul_De_Sac;
  2131.  
  2132. Object In_A_Cul_De_Sac "Cul-de-Sac"
  2133.   with description
  2134.                "You are in a cul-de-sac about eight feet 
  2135.                across.",
  2136.        u_to In_Ragged_Corridor,
  2137.        out_to In_Ragged_Corridor;
  2138.  
  2139. ! ----------------------------------------------------------------------------
  2140. !   Witt's End: Cave under construction
  2141. ! ----------------------------------------------------------------------------
  2142.  
  2143. Object In_Anteroom "In Anteroom"
  2144.   with description
  2145.                "You are in an anteroom leading to a large 
  2146.                passage to the east. Small passages go west and up. 
  2147.                The remnants of recent digging are evident.",
  2148.        u_to At_Complex_Junction,
  2149.        w_to In_Bedquilt,
  2150.        e_to At_Witts_End;
  2151.  
  2152. Object -> "sign"
  2153.   with initial
  2154.               "A sign in midair here says ~Cave under 
  2155.                construction beyond this point. Proceed at own risk. 
  2156.                [Witt Construction Company]~",
  2157.        name "sign" "witt" "company" "construction",
  2158.        before [; Take: "It's hanging way above your head."; ],
  2159.   has  static;
  2160.  
  2161. Object -> "recent issues of ~Spelunker Today~"
  2162.   with name "magazines" "magazine" "issue" "issues" "spelunker" "today",
  2163.        initial
  2164.            "There are a few recent issues of ~Spelunker Today~ magazine here.",
  2165.        description "I'm afraid the magazines are written in Dwarvish.",
  2166.        article "a few",
  2167.        after
  2168.        [; Take: if (location==At_Witts_End) score--;
  2169.           Drop: if (location==At_Witts_End)
  2170.                 {   score++;
  2171.                     "You really are at wit's end.";
  2172.                 }
  2173.        ],
  2174.   has  multitude;
  2175.  
  2176. Object At_Witts_End "At Witt's End"
  2177.   with description
  2178.                "You are at Witt's End. Passages lead off in 
  2179.                *all* directions.",
  2180.        w_to   "You have crawled around in some little holes and 
  2181.                found your way blocked by a recent cave-in. You are 
  2182.                now back in the main passage.",
  2183.        before
  2184.        [; Go: if (noun~=w_obj && random(100)<=95)
  2185.                  "You have crawled around in some little holes and 
  2186.                   wound up back in the main passage.";
  2187.               PlayerTo(In_Anteroom); rtrue;
  2188.        ];
  2189.  
  2190. ! ----------------------------------------------------------------------------
  2191. !   North of the secret canyons, on the other side of the pit
  2192. ! ----------------------------------------------------------------------------
  2193.  
  2194. Object In_Mirror_Canyon "In Mirror Canyon"
  2195.   with description
  2196.                "You are in a north/south canyon about 25 feet 
  2197.                across. The floor is covered by white mist seeping 
  2198.                in from the north. The walls extend upward for well 
  2199.                over 100 feet. Suspended from some unseen point far 
  2200.                above you, an enormous two-sided mirror is hanging 
  2201.                parallel to and midway between the canyon walls.^^
  2202.                A small window can be seen in either wall, 
  2203.                some fifty feet up.",
  2204.        s_to In_Secret_N_S_Canyon_0,
  2205.        n_to At_Reservoir;
  2206.  
  2207. Object -> "suspended mirror"
  2208.   with description
  2209.                "The mirror is obviously provided for the use of the 
  2210.                dwarves who, as you know, are extremely vain.",
  2211.        name "mirror" "massive" "enormous" "hanging" "suspended"
  2212.             "dwarves^" "two-sided" "two" "sided",
  2213.        initial "The mirror is obviously provided for the use of the 
  2214.                 dwarves, who as you know, are extremely vain.",
  2215.        before [; Attack, Remove: "You can't reach it from here."; ],
  2216.   has  static;
  2217.  
  2218.  
  2219. Object At_Window_On_Pit_2 "At Window on Pit"
  2220.   with description
  2221.                "You're at a low window overlooking a huge pit, 
  2222.                which extends up out of sight. A floor is 
  2223.                indistinctly visible over 50 feet below. Traces of 
  2224.                white mist cover the floor of the pit, becoming 
  2225.                thicker to the left. Marks in the dust around the 
  2226.                window would seem to indicate that someone has been 
  2227.                here recently. Directly across the pit from you and 
  2228.                25 feet away there is a similar window looking into a 
  2229.                lighted room. A shadowy figure can be seen there 
  2230.                peering back at you.",
  2231.        cant_go "The only passage is back west to the junction.",
  2232.        w_to At_Junction_Of_Three,
  2233.        before
  2234.        [; Jump: deadflag=1; "You jump and break your neck!";
  2235.           WaveHands: "The shadowy figure waves back at you!";
  2236.        ];
  2237.  
  2238. Object At_Reservoir "At Reservoir"
  2239.   with description
  2240.                "You are at the edge of a large underground 
  2241.                reservoir. An opaque cloud of white mist fills the 
  2242.                room and rises rapidly upward. The lake is fed by a 
  2243.                stream, which tumbles out of a hole in the wall about 
  2244.                10 feet overhead and splashes noisily into the water 
  2245.                somewhere within the mist. The only passage goes 
  2246.                back toward the south.",
  2247.        s_to In_Mirror_Canyon,
  2248.        out_to In_Mirror_Canyon,
  2249.        before
  2250.        [; Swim: "The water is icy cold, and you would soon freeze to death.";
  2251.        ];
  2252.  
  2253. ! ----------------------------------------------------------------------------
  2254. !   The Chasm and the Troll Bridge
  2255. ! ----------------------------------------------------------------------------
  2256.  
  2257. Object In_Sloping_Corridor "Sloping Corridor"
  2258.   with description
  2259.                "You are in a long winding corridor sloping out 
  2260.                of sight in both directions.",
  2261.        d_to In_Large_Low_Room,
  2262.        u_to On_Sw_Side_Of_Chasm,
  2263.        cant_go "The corridor slopes steeply up and down.";
  2264.  
  2265. Object On_Sw_Side_Of_Chasm "On SW Side of Chasm"
  2266.   with description
  2267.                "You are on one side of a large, deep chasm. A 
  2268.                heavy white mist rising up from below obscures all 
  2269.                view of the far side. A southwest path leads away 
  2270.                from the chasm into a winding corridor.",
  2271.        ne_to CrossRicketyBridge,
  2272.        sw_to In_Sloping_Corridor,
  2273.        d_to In_Sloping_Corridor,
  2274.        cant_go "The path winds southwest.",
  2275.        before
  2276.        [; Jump: if (RicketyBridge in self)
  2277.                     "I respectfully suggest you go across the 
  2278.                      bridge instead of jumping.";
  2279.               deadflag=1; "You didn't make it.";
  2280.        ];
  2281.  
  2282. [ CrossRicketyBridge;
  2283.   if (Troll has general || Troll in nothing)
  2284.   {
  2285.       give Troll ~general;
  2286.       if (Bear has general)
  2287.       {   remove Bear; remove self; give Wreckage ~absent;
  2288.           remove RicketyBridge; give RicketyBridge absent; StopDaemon(Bear);
  2289.           deadflag=1;
  2290.           "Just as you reach the other side, the bridge 
  2291.            buckles beneath the weight of the bear, which 
  2292.            was still following you around. You scrabble 
  2293.            desperately for support, but as the bridge 
  2294.            collapses you stumble back and fall into the 
  2295.            chasm.";
  2296.       }
  2297.       return RicketyBridge;
  2298.   }
  2299.   if (Troll in location)
  2300.       "The troll refuses to let you cross.";
  2301.   move Troll to location;
  2302.   "The troll steps out from beneath the bridge and blocks your way.";
  2303. ];
  2304.  
  2305. Object -> RicketyBridge "rickety bridge"
  2306.   with description "It just looks like an ordinary, but unstable, bridge.",
  2307.        describe
  2308.        [; print "A rickety wooden bridge extends across the 
  2309.                  chasm, vanishing into the mist.^^
  2310.                  A sign posted on the bridge reads, 
  2311.                  ~Stop! Pay troll!~^";
  2312.           if (Troll notin location)
  2313.                  "The troll is nowhere to be seen.";
  2314.           rtrue;
  2315.        ],
  2316.        name "bridge" "rickety" "unstable" "wobbly" "rope",
  2317.        door_dir
  2318.        [; if (location==On_Sw_Side_Of_Chasm) return ne_to; return sw_to;
  2319.        ],
  2320.        door_to
  2321.        [; if (location==On_Sw_Side_Of_Chasm) return On_Ne_Side_Of_Chasm;
  2322.           return On_Sw_Side_Of_Chasm;
  2323.        ],
  2324.        found_in  On_Sw_Side_Of_Chasm  On_Ne_Side_Of_Chasm
  2325.   has  static door open;
  2326.  
  2327. Object -> -> Troll "burly troll"
  2328.   with description
  2329.                "Trolls are close relatives with rocks and have skin 
  2330.                 as tough as that of a rhinoceros.",
  2331.        initial "A burly troll stands by the bridge and insists you 
  2332.                 throw him a treasure before you may cross.",
  2333.        name "troll" "burly",
  2334.        life
  2335.        [; Attack: "The troll laughs aloud at your pitiful attempt 
  2336.                    to injure him.";
  2337.           ThrowAt, Give:
  2338.               if (noun ofclass Treasure)
  2339.               {   remove noun;
  2340.                   move Troll to RicketyBridge;
  2341.                   give Troll general; score=score-5;
  2342.                   "The troll catches your treasure and scurries 
  2343.                    away out of sight.";
  2344.               }
  2345.               if (noun==tasty_food)
  2346.                   "Gluttony is not one of the troll's vices. 
  2347.                    Avarice, however, is.";
  2348.               "The troll deftly catches ", (the) noun,
  2349.               ", examines it carefully, and tosses it back, declaring, 
  2350.               ~Good workmanship, but it's not valuable enough.~";
  2351.           Order: "You'll be lucky.";
  2352.           Answer, Ask: "Trolls make poor conversation.";
  2353.        ],
  2354.   has  animate;
  2355.  
  2356. Object Wreckage "wreckage of bridge"
  2357.   with initial "The wreckage of the troll bridge (and a dead bear) 
  2358.                 can be seen at the bottom of the chasm.",
  2359.        name "wreckage" "wreck" "bridge" "dead" "bear",
  2360.        before
  2361.        [; "The wreckage is too far below.";
  2362.        ],
  2363.        found_in  On_Sw_Side_Of_Chasm  On_Ne_Side_Of_Chasm
  2364.   has  static absent;
  2365.  
  2366.  
  2367. Object On_Ne_Side_Of_Chasm "On NE Side of Chasm"
  2368.   with description
  2369.                "You are on the far side of the chasm. A 
  2370.                northeast path leads away from the chasm on this 
  2371.                side.",
  2372.        sw_to CrossRicketyBridge,
  2373.        ne_to In_Corridor,
  2374.        before
  2375.        [; Jump: if (RicketyBridge in self)
  2376.                     "I respectfully suggest you go across the 
  2377.                      bridge instead of jumping.";
  2378.               deadflag=1; "You didn't make it.";
  2379.        ],
  2380.   has  nodwarf;
  2381.  
  2382. Object In_Corridor "In Corridor"
  2383.   with description
  2384.                "You're in a long east/west corridor. A faint 
  2385.                rumbling noise can be heard in the distance.",
  2386.        w_to On_Ne_Side_Of_Chasm,
  2387.        e_to At_Fork_In_Path
  2388.   has  nodwarf;
  2389.  
  2390. ! ----------------------------------------------------------------------------
  2391. !   The Volcano
  2392. ! ----------------------------------------------------------------------------
  2393.  
  2394. Object At_Fork_In_Path "At Fork in Path"
  2395.   with description
  2396.                "The path forks here. The left fork leads 
  2397.                northeast. A dull rumbling seems to get louder in 
  2398.                that direction. The right fork leads southeast down 
  2399.                a gentle slope. The main corridor enters from the 
  2400.                west.",
  2401.        w_to In_Corridor,
  2402.        ne_to At_Junction_With_Warm_Walls,
  2403.        se_to In_Limestone_Passage,
  2404.        d_to In_Limestone_Passage
  2405.   has  nodwarf;
  2406.  
  2407. Object At_Junction_With_Warm_Walls "At Junction With Warm Walls"
  2408.   with description
  2409.                "The walls are quite warm here. From the north 
  2410.                can be heard a steady roar, so loud that the entire 
  2411.                cave seems to be trembling. Another passage leads 
  2412.                south, and a low crawl goes east.",
  2413.        s_to At_Fork_In_Path,
  2414.        n_to At_Breath_Taking_View,
  2415.        e_to In_Chamber_Of_Boulders
  2416.   has  nodwarf;
  2417.  
  2418.  
  2419. Object At_Breath_Taking_View "At Breath-Taking View"
  2420.   with description
  2421.                "You are on the edge of a breath-taking view. Far 
  2422.                below you is an active volcano, from which great 
  2423.                gouts of molten lava come surging out, cascading back 
  2424.                down into the depths. The glowing rock fills the 
  2425.                farthest reaches of the cavern with a blood-red 
  2426.                glare, giving everything an eerie, macabre 
  2427.                appearance. The air is filled with flickering sparks 
  2428.                of ash and a heavy smell of brimstone. The walls are 
  2429.                hot to the touch, and the thundering of the volcano 
  2430.                drowns out all other sounds. Embedded in the jagged 
  2431.                roof far overhead are myriad twisted formations 
  2432.                composed of pure white alabaster, which scatter the 
  2433.                murky light into sinister apparitions upon the walls. 
  2434.                To one side is a deep gorge, filled with a bizarre 
  2435.                chaos of tortured rock which seems to have been 
  2436.                crafted by the devil himself. An immense river of 
  2437.                fire crashes out from the depths of the volcano, 
  2438.                burns its way through the gorge, and plummets into a 
  2439.                bottomless pit far off to your left. To the right, 
  2440.                an immense geyser of blistering steam erupts 
  2441.                continuously from a barren island in the center of a 
  2442.                sulfurous lake, which bubbles ominously. The far 
  2443.                right wall is aflame with an incandescence of its 
  2444.                own, which lends an additional infernal splendor to 
  2445.                the already hellish scene. A dark, forboding passage 
  2446.                exits to the south.",
  2447.        s_to At_Junction_With_Warm_Walls,
  2448.        out_to At_Junction_With_Warm_Walls,
  2449.        d_to "Don't be ridiculous!",
  2450.        before [; Jump: <<Go d_obj>>; ],
  2451.   has  light;
  2452.  
  2453.  
  2454. Object -> "active volcano"
  2455.   with description
  2456.                "Great gouts of molten lava come surging out of the 
  2457.                volcano and go cascading back down into the depths. 
  2458.                The glowing rock fills the farthest reaches of the 
  2459.                cavern with a blood-red glare, giving everything an 
  2460.                eerie, macabre appearance.",
  2461.        name "volcano" "rock"
  2462.             "active" "glowing" "blood" "blood-red" "red" "eerie" "macabre"
  2463.   has  scenery;
  2464.  
  2465.  
  2466. Object -> "sparks of ash"
  2467.   with description "The sparks too far away for you to get a good look at 
  2468.                     them.",
  2469.        name "spark" "sparks" "ash" "air" "flickering"
  2470.   has  scenery multitude;
  2471.  
  2472.  
  2473. Object -> "jagged roof"
  2474.   with description
  2475.                "Embedded in the jagged roof far overhead are myriad 
  2476.                twisted formations composed of pure white alabaster, 
  2477.                which scatter the murky light into sinister 
  2478.                apparitions upon the walls.",
  2479.        name "roof" "formations" "light" "apparaitions"
  2480.             "jagged" "twsited" "murky" "sinister"
  2481.   has  scenery;
  2482.  
  2483. Object -> "deep gorge"
  2484.   with description
  2485.                "The gorge is filled with a bizarre chaos of tortured 
  2486.                rock which seems to have been crafted by the devil 
  2487.                himself.",
  2488.        name "gorge" "chaos" "rock" "deep" "bizarre" "tortured"
  2489.   has  scenery;
  2490.  
  2491. Object -> "river of fire"
  2492.   with description
  2493.                "The river of fire crashes out from the depths of the 
  2494.                volcano, burns its way through the gorge, and 
  2495.                plummets into a bottomless pit far off to your 
  2496.                left.",
  2497.        name "river" "fire" "depth" "pit" "fire" "fiery" "bottomless"
  2498.   has  scenery;
  2499.  
  2500. Object -> "immense geyser"
  2501.   with description
  2502.                "The geyser of blistering steam erupts continuously 
  2503.                from a barren island in the center of a sulfurous 
  2504.                lake, which bubbles ominously.",
  2505.        name "geyser" "steam" "island" "lake"
  2506.             "immense" "blistering" "barren" "sulfrous"
  2507.             "sulferous" "sulpherous" "sulphrous" "bubbling"
  2508.   has  scenery;
  2509.  
  2510.  
  2511. Object In_Chamber_Of_Boulders "In Chamber of Boulders"
  2512.   with description
  2513.                "You are in a small chamber filled with large 
  2514.                boulders. The walls are very warm, causing the air 
  2515.                in the room to be almost stifling from the heat. The 
  2516.                only exit is a crawl heading west, through which is 
  2517.                coming a low rumbling.",
  2518.        w_to At_Junction_With_Warm_Walls,
  2519.        out_to At_Junction_With_Warm_Walls
  2520.   has  nodwarf;
  2521.  
  2522.  
  2523. Object -> "boulders"
  2524.   with description "They're just ordinary boulders. They're warm.",
  2525.        name "boulder" "boulders" "rocks" "stones"
  2526.   has  scenery multitude;
  2527.  
  2528. Treasure -> "rare spices"
  2529.   with name "spices" "spice" "rare" "exotic",
  2530.        depositpoints 14, article "a selection of",
  2531.        before
  2532.        [; Smell, Examine: "They smell wonderfully exotic!";
  2533.        ],
  2534.   has  multitude;
  2535.  
  2536. Object In_Limestone_Passage "In Limestone Passage"
  2537.   with description
  2538.                "You are walking along a gently sloping 
  2539.                north/south passage lined with oddly shaped limestone 
  2540.                formations.",
  2541.        n_to At_Fork_In_Path,
  2542.        u_to At_Fork_In_Path,
  2543.        s_to In_Front_Of_Barren_Room,
  2544.        d_to In_Front_Of_Barren_Room
  2545.   has  nodwarf;
  2546.  
  2547. Object -> "limestone formations"
  2548.   with description
  2549.                "Every now and then a particularly strange shape 
  2550.                catches your eye.",
  2551.        name "formations" "shape" "shapes"
  2552.             "lime" "limestone" "stone" "oddly" "shaped"
  2553.             "oddly-shaped"
  2554.   has  scenery multitude;
  2555.  
  2556. ! ----------------------------------------------------------------------------
  2557. !   If you go down to the woods today...
  2558. ! ----------------------------------------------------------------------------
  2559.  
  2560. Object In_Front_Of_Barren_Room "In Front of Barren Room"
  2561.   with description
  2562.                "You are standing at the entrance to a large, 
  2563.                barren room. A sign posted above the entrance reads: 
  2564.                ~Caution! Bear in room!~",
  2565.        w_to In_Limestone_Passage,
  2566.        u_to In_Limestone_Passage,
  2567.        e_to In_Barren_Room,
  2568.        in_to In_Barren_Room
  2569.   has  nodwarf;
  2570.  
  2571.  
  2572. Object -> "caution sign"
  2573.   with description "The sign reads, ~Caution! Bear in room!~",
  2574.        name "sign" "barren" "room" "caution"
  2575.   has  scenery;
  2576.  
  2577.  
  2578. Object In_Barren_Room "In Barren Room"
  2579.   with description
  2580.                "You are inside a barren room. The center of 
  2581.                the room is completely empty except for some dust. 
  2582.                Marks in the dust lead away toward the far end of the 
  2583.                room. The only exit is the way you came in.",
  2584.        w_to In_Front_Of_Barren_Room,
  2585.        out_to In_Front_Of_Barren_Room
  2586.   has  nodwarf;
  2587.  
  2588.  
  2589. Object -> "dust"
  2590.   with description "It just looks like ordinary dust.",
  2591.        name "dust" "marks"
  2592.   has  scenery;
  2593.  
  2594. Object -> Bear "large cave bear"
  2595.   with
  2596.        following_you false,
  2597.        angry true,
  2598.   
  2599.        describe
  2600.        [; if (self.following_you)
  2601.              "You are being followed by a very large, tame bear.";
  2602.           if (self.angry)
  2603.              "There is a ferocious cave bear 
  2604.               eyeing you from the far end of the room!";
  2605.           if (location==In_Barren_Room)
  2606.              "There is a gentle cave bear sitting placidly in one corner.";
  2607.           "There is a contented-looking bear wandering about nearby.";
  2608.        ],
  2609.        name "bear" "large" "tame" "ferocious" "cave",
  2610.        life
  2611.        [; Attack: if (axe in player) <<ThrowAt axe Bear>>;
  2612.               if (self.angry == false)
  2613.                   "The bear is confused; he only wants to be your friend.";
  2614.               "With what? Your bare hands? Against *his* bear hands??";
  2615.           ThrowAt: 
  2616.               if (noun~=axe) <<Give noun Bear>>;
  2617.               if (self.angry == false)
  2618.                   "The bear is confused; he only wants to be your friend.";
  2619.               move axe to location; give axe general;
  2620.               "The axe misses and lands near the bear 
  2621.                where you can't get at it.";
  2622.           Give:
  2623.               if (noun == tasty_food)
  2624.               {   give axe ~general; remove tasty_food;
  2625.                   self.angry = false;
  2626.                  "The bear eagerly wolfs down your food, after 
  2627.                   which he seems to calm down considerably and 
  2628.                   even becomes rather friendly.";
  2629.               }
  2630.               if (self.angry == false)
  2631.                   "The bear doesn't seem very interested in your offer.";
  2632.               "Uh-oh -- your offer only makes the bear angrier!";
  2633.           Order, Ask, Answer: "This is a Bear of very little brain.";
  2634.        ],
  2635.        before
  2636.        [; Examine:
  2637.               print "The bear is extremely large, ";
  2638.               if (self.angry == false) "but appears to be friendly.";
  2639.               "and seems quite ferocious!";
  2640.           Take, Catch: if (self.angry) "Surely you're joking!";
  2641.               if (golden_chain has locked)
  2642.                   "The bear is still chained to the wall.";
  2643.               self.following_you = true; StartDaemon(Bear);
  2644.               "Ok, the bear's now following you around.";
  2645.           Drop, Release: if (self.following_you == false) "What?";
  2646.               self.following_you = false; StopDaemon(Bear);
  2647.               if (Troll in location)
  2648.               {   remove Troll;
  2649.                   "The bear lumbers toward the troll, who lets 
  2650.                    out a startled shriek and scurries away. The 
  2651.                    bear soon gives up the pursuit and wanders 
  2652.                    back.";
  2653.               }
  2654.               "The bear wanders away from you.";
  2655.        ],
  2656.  
  2657.        daemon
  2658.        [; if (location==thedark) rfalse;
  2659.           if (self in location)
  2660.           {   if (location==At_Breath_Taking_View)
  2661.                   "^The bear roars with delight.";
  2662.               rfalse;
  2663.           }
  2664.           move self to location;
  2665.           "^The bear lumbers along behind you.";
  2666.        ],
  2667.   has  animate;
  2668.  
  2669. Treasure -> golden_chain "golden chain"
  2670.   with depositpoints 14,
  2671.        describe
  2672.        [; if (self has locked) "The bear is held back by a solid gold chain.";
  2673.           "A solid golden chain lies in coils on the ground!";
  2674.        ],
  2675.        description "The chain has thick links of solid gold!",
  2676.        name "chain" "links" "shackles" "solid"
  2677.             "gold" "golden" "thick" "chains",
  2678.        with_key set_of_keys,
  2679.        before
  2680.        [; Take: if (self has locked)
  2681.                 {   if (Bear.angry) "It's locked to the ferocious bear!";
  2682.                     "It's locked to the friendly bear.";              
  2683.                 }
  2684.           Unlock:
  2685.                 if (Bear.angry)
  2686.                    "There is no way to get past the bear to 
  2687.                     unlock the chain, which is probably just as well.";
  2688.           Lock: if (self hasnt locked) "The mechanism won't lock again.";
  2689.        ],
  2690.        after
  2691.        [; Unlock: "You unlock the chain, and set the tame bear free.";
  2692.        ],
  2693.   has  lockable locked;
  2694.  
  2695. ! ----------------------------------------------------------------------------
  2696. !   The Different Maze
  2697. ! ----------------------------------------------------------------------------
  2698.  
  2699. Class  DiffMazeRoom
  2700.   with short_name "Maze";
  2701.  
  2702. DiffMazeRoom Different_Maze_1
  2703.   with description
  2704.           "You are in a maze of twisty little passages, all different.",
  2705.        s_to  Different_Maze_3,
  2706.        sw_to Different_Maze_4,
  2707.        ne_to Different_Maze_5,
  2708.        se_to Different_Maze_6,
  2709.        u_to  Different_Maze_7,
  2710.        nw_to Different_Maze_8,
  2711.        e_to  Different_Maze_9,
  2712.        w_to  Different_Maze_10,
  2713.        n_to  Different_Maze_11,
  2714.        d_to  At_West_End_Of_Long_Hall;
  2715.  
  2716.  
  2717. DiffMazeRoom Different_Maze_2
  2718.   with description
  2719.           "You are in a little maze of twisting passages, all different.",
  2720.        sw_to Different_Maze_3,
  2721.        n_to Different_Maze_4,
  2722.        e_to Different_Maze_5,
  2723.        nw_to Different_Maze_6,
  2724.        se_to Different_Maze_7,
  2725.        ne_to Different_Maze_8,
  2726.        w_to Different_Maze_9,
  2727.        d_to Different_Maze_10,
  2728.        u_to Different_Maze_11,
  2729.        s_to Dead_End_14;
  2730.  
  2731. DiffMazeRoom Different_Maze_3
  2732.   with description
  2733.           "You are in a maze of twisting little passages, all different.",
  2734.        w_to Different_Maze_1,
  2735.        se_to Different_Maze_4,
  2736.        nw_to Different_Maze_5,
  2737.        sw_to Different_Maze_6,
  2738.        ne_to Different_Maze_7,
  2739.        u_to Different_Maze_8,
  2740.        d_to Different_Maze_9,
  2741.        n_to Different_Maze_10,
  2742.        s_to Different_Maze_11,
  2743.        e_to Different_Maze_2;
  2744.  
  2745. DiffMazeRoom Different_Maze_4
  2746.   with description
  2747.           "You are in a little maze of twisty passages, all different.",
  2748.        nw_to Different_Maze_1,
  2749.        u_to Different_Maze_3,
  2750.        n_to Different_Maze_5,
  2751.        s_to Different_Maze_6,
  2752.        w_to Different_Maze_7,
  2753.        sw_to Different_Maze_8,
  2754.        ne_to Different_Maze_9,
  2755.        e_to Different_Maze_10,
  2756.        d_to Different_Maze_11,
  2757.        se_to Different_Maze_2;
  2758.  
  2759. DiffMazeRoom Different_Maze_5
  2760.   with description
  2761.           "You are in a twisting maze of little passages, all different.",
  2762.        u_to Different_Maze_1,
  2763.        d_to Different_Maze_3,
  2764.        w_to Different_Maze_4,
  2765.        ne_to Different_Maze_6,
  2766.        sw_to Different_Maze_7,
  2767.        e_to Different_Maze_8,
  2768.        n_to Different_Maze_9,
  2769.        nw_to Different_Maze_10,
  2770.        se_to Different_Maze_11,
  2771.        s_to Different_Maze_2;
  2772.  
  2773. DiffMazeRoom Different_Maze_6
  2774.   with description
  2775.           "You are in a twisting little maze of passages, all different.",
  2776.        ne_to Different_Maze_1,
  2777.        n_to Different_Maze_3,
  2778.        nw_to Different_Maze_4,
  2779.        se_to Different_Maze_5,
  2780.        e_to Different_Maze_7,
  2781.        d_to Different_Maze_8,
  2782.        s_to Different_Maze_9,
  2783.        u_to Different_Maze_10,
  2784.        w_to Different_Maze_11,
  2785.        sw_to Different_Maze_2;
  2786.  
  2787. DiffMazeRoom Different_Maze_7
  2788.   with description
  2789.           "You are in a twisty little maze of passages, all different.",
  2790.        n_to Different_Maze_1,
  2791.        se_to Different_Maze_3,
  2792.        d_to Different_Maze_4,
  2793.        s_to Different_Maze_5,
  2794.        e_to Different_Maze_6,
  2795.        w_to Different_Maze_8,
  2796.        sw_to Different_Maze_9,
  2797.        ne_to Different_Maze_10,
  2798.        nw_to Different_Maze_11,
  2799.        u_to Different_Maze_2;
  2800.  
  2801. DiffMazeRoom Different_Maze_8
  2802.   with description
  2803.           "You are in a twisty maze of little passages, all different.",
  2804.        e_to Different_Maze_1,
  2805.        w_to Different_Maze_3,
  2806.        u_to Different_Maze_4,
  2807.        sw_to Different_Maze_5,
  2808.        d_to Different_Maze_6,
  2809.        s_to Different_Maze_7,
  2810.        nw_to Different_Maze_9,
  2811.        se_to Different_Maze_10,
  2812.        ne_to Different_Maze_11,
  2813.        n_to Different_Maze_2;
  2814.  
  2815. DiffMazeRoom Different_Maze_9
  2816.   with description
  2817.           "You are in a little twisty maze of passages, all different.",
  2818.        se_to Different_Maze_1,
  2819.        ne_to Different_Maze_3,
  2820.        s_to Different_Maze_4,
  2821.        d_to Different_Maze_5,
  2822.        u_to Different_Maze_6,
  2823.        nw_to Different_Maze_7,
  2824.        n_to Different_Maze_8,
  2825.        sw_to Different_Maze_10,
  2826.        e_to Different_Maze_11,
  2827.        w_to Different_Maze_2;
  2828.  
  2829.  
  2830. DiffMazeRoom Different_Maze_10
  2831.   with description
  2832.           "You are in a maze of little twisting passages, all different.",
  2833.        d_to Different_Maze_1,
  2834.        e_to Different_Maze_3,
  2835.        ne_to Different_Maze_4,
  2836.        u_to Different_Maze_5,
  2837.        w_to Different_Maze_6,
  2838.        n_to Different_Maze_7,
  2839.        s_to Different_Maze_8,
  2840.        se_to Different_Maze_9,
  2841.        sw_to Different_Maze_11,
  2842.        nw_to Different_Maze_2;
  2843.  
  2844. DiffMazeRoom Different_Maze_11
  2845.   with description
  2846.           "You are in a maze of little twisty passages, all different.",
  2847.        sw_to Different_Maze_1,
  2848.        nw_to Different_Maze_3,
  2849.        e_to Different_Maze_4,
  2850.        w_to Different_Maze_5,
  2851.        n_to Different_Maze_6,
  2852.        d_to Different_Maze_7,
  2853.        se_to Different_Maze_8,
  2854.        u_to Different_Maze_9,
  2855.        s_to Different_Maze_10,
  2856.        ne_to Different_Maze_2;
  2857.  
  2858.  
  2859. DeadEndRoom Dead_End_14
  2860.   with short_name
  2861.            "Dead End, near Vending Machine",
  2862.        description
  2863.            "You have reached a dead end. There is a massive 
  2864.             vending machine here.",
  2865.        n_to Different_Maze_2,
  2866.        out_to Different_Maze_2
  2867.   has  nodwarf;
  2868.  
  2869. Object -> "message in the dust"
  2870.   with description
  2871.            "The message reads, ~This is not the maze where the 
  2872.             pirate leaves his treasure chest.~",
  2873.        name "message" "scrawl" "writing" "script" "scrawled" "flowery",
  2874.        initial "Hmmm... There is a message here 
  2875.                 scrawled in the dust in a flowery script."
  2876.   has  scenery;
  2877.  
  2878.  
  2879. Object -> VendingMachine "vending machine"
  2880.   with description
  2881.                "The instructions on the vending machine read, 
  2882.                ~Insert coins to receive fresh batteries.~",
  2883.        name "machine" "slot" "vending" "massive" "battery" "coin",
  2884.        before
  2885.        [; Receive:
  2886.              if (noun==rare_coins)
  2887.              {   move fresh_batteries to location;
  2888.                  remove rare_coins;
  2889.                  "Soon after you insert the coins in the coin 
  2890.                   slot, the vending machines makes a grinding 
  2891.                   sound, and a set of fresh batteries falls at your feet.";
  2892.              }
  2893.              "The machine seems to be designed to take coins.";
  2894.           Attack:
  2895.              "The machine is quite sturdy and survives your attack 
  2896.               without getting so much as a scratch.";
  2897.           LookUnder:
  2898.                "You don't find anything under the machine.";
  2899.           Search:
  2900.                "You can't get inside the machine.";
  2901.           Take: "The vending machine is far too heavy to move.";
  2902.        ],
  2903.   has  scenery;
  2904.  
  2905. Object fresh_batteries "fresh batteries" VendingMachine
  2906.   with description "They look like ordinary batteries. (A sepulchral 
  2907.                     voice says, ~Still going!~)",
  2908.        initial "There are fresh batteries here.",
  2909.        name "batteries" "battery" "fresh",
  2910.        before [; Count: "A pair."; ];
  2911.  
  2912. Object old_batteries "worn-out batteries"
  2913.   with description "They look like ordinary batteries.",
  2914.        initial "Some worn-out batteries have been discarded nearby.",
  2915.        name "batteries" "battery" "worn" "out" "worn-out",
  2916.        before [; Count: "A pair."; ];
  2917.  
  2918. ! ----------------------------------------------------------------------------
  2919. !   Dwarves!
  2920. ! ----------------------------------------------------------------------------
  2921.  
  2922. Object dwarf "threatening little dwarf"
  2923.   with name "dwarf" "threatening" "nasty" "little" "mean",
  2924.        description "It's probably not a good idea to get too close. Suffice 
  2925.                     it to say the little guy's pretty aggressive.",
  2926.        initial "A threatening little dwarf hides in the shadows.",
  2927.        number 5,
  2928.  
  2929.        daemon
  2930.        [; if (location==thedark) return;
  2931.           if (self.number==0) { StopDaemon(self); return; }
  2932.           if (parent(dwarf)==0)
  2933.           {   if (location has nodwarf || location has light) return;
  2934.               if (random(100)<=self.number)
  2935.               {   if (Bear in location || Troll in location) return;
  2936.                   new_line;
  2937.                   if (Dragon in location)
  2938.                   {   self.number--;
  2939.                       "A dwarf appears, but with one casual blast the dragon 
  2940.                        vapourises him!";
  2941.                   }
  2942.                   move dwarf to location;
  2943.                   "A threatening little dwarf comes out of the shadows!";
  2944.               }
  2945.               return;
  2946.           }
  2947.           if (parent(dwarf)~=location)
  2948.           {   if (location==thedark) return;
  2949.               if (location has nodwarf || location has light) return;
  2950.               if (random(100)<=96 && parent(dwarf)~=In_Mirror_Canyon)
  2951.               {   move dwarf to location;
  2952.                   print "^The dwarf stalks after you...^";
  2953.               }
  2954.               else { remove dwarf; return; }
  2955.           }
  2956.           if (random(100)<=75)
  2957.           {   new_line;
  2958.               if (self hasnt general)
  2959.               {   move axe to location; give self general; remove self;
  2960.                   "The dwarf throws a nasty little axe at you, misses, 
  2961.                   curses, and runs away.";
  2962.               }
  2963.               if (location==In_Mirror_Canyon)
  2964.                   "The dwarf admires himself in the mirror.";
  2965.               print "The dwarf throws a nasty little knife at you, ";
  2966.               if (random(1000)<=95) { deadflag=1; "and hits!"; }
  2967.               "but misses!";
  2968.           }
  2969.           if (random(3)==1)
  2970.           { remove dwarf; "^Tiring of this, the dwarf slips away."; }
  2971.        ],
  2972.        before
  2973.        [; Kick: "You boot the dwarf across the room. He curses, then 
  2974.                  gets up and brushes himself off. Now he's madder 
  2975.                  than ever!";
  2976.        ],
  2977.        life
  2978.        [; ThrowAt:
  2979.            if (noun==axe)
  2980.            {   if (random(3)~=1)
  2981.                {   remove self; move axe to location;
  2982.                    self.number--;
  2983.                    "You killed a little dwarf! The body vanishes in a cloud 
  2984.                     of greasy black smoke.";
  2985.                }
  2986.                move axe to location;
  2987.                "Missed! The little dwarf dodges out of the way of the axe.";
  2988.            }
  2989.            <<Give noun second>>;
  2990.           Give:
  2991.            if (noun==tasty_food) "You fool, dwarves eat only coal! 
  2992.                                   Now you've made him *really* mad!";
  2993.            "The dwarf is not at all interested in your 
  2994.             offer. (The reason being, perhaps, that if 
  2995.             he kills you he gets everything you have 
  2996.             anyway.)";
  2997.           Attack: "Not with your bare hands. No way.";
  2998.        ],
  2999.   has  animate;
  3000.  
  3001. Object axe "dwarvish axe"
  3002.   with name "axe" "little" "dwarvish" "dwarven",
  3003.        initial "There is a little axe here.",
  3004.        description "It's just a little axe.",
  3005.        before
  3006.        [; if (axe hasnt general) rfalse;
  3007.           Examine: "It's lying beside the bear.";
  3008.           Take:    "No chance. It's lying beside the ferocious 
  3009.                     bear, quite within harm's way.";
  3010.        ];
  3011.  
  3012. ! ----------------------------------------------------------------------------
  3013. !   Two brushes with piracy
  3014. ! ----------------------------------------------------------------------------
  3015.  
  3016. Object pirate
  3017.   with
  3018.        has_stolen_something false,
  3019.        has_been_spotted false,
  3020.  
  3021.        daemon
  3022.        [ obj booty_nearby;
  3023.  
  3024.           if (random(100) > 2
  3025.               || location==thedark or In_Secret_Canyon
  3026.               || location has light
  3027.               || location has nodwarf) return;
  3028.  
  3029.           if (dwarf in location)
  3030.              "^A bearded pirate appears, catches sight of the dwarf and runs 
  3031.               away.";
  3032.  
  3033.           objectloop (obj ofclass Treasure && obj in player or location)
  3034.               booty_nearby = true;
  3035.  
  3036.           if (booty_nearby == false)
  3037.           {    if (self.has_been_spotted) return;
  3038.                self.has_been_spotted = true;
  3039.                if (self.has_stolen_something) StopDaemon(self);
  3040.               "^There are faint rustling noises from the darkness behind you.
  3041.                As you turn toward them, you spot a bearded pirate. He is
  3042.                carrying a large chest.^^
  3043.                ~Shiver me timbers!~ he cries, ~I've been spotted! I'd best
  3044.                hie meself off to the maze to hide me chest!~^^
  3045.                With that, he vanishes into the gloom.";
  3046.           }
  3047.  
  3048.           if (self.has_stolen_something) return;
  3049.           self.has_stolen_something = true;
  3050.           if (self.has_been_spotted) StopDaemon(self);
  3051.  
  3052.           objectloop (obj ofclass Treasure && obj in player or location)
  3053.           {   if (obj in player) score = score - 5;
  3054.               move obj to Dead_End_13;
  3055.           }
  3056.  
  3057.           "^Out from the shadows behind you pounces a bearded pirate! ~Har, 
  3058.            har,~ he chortles. ~I'll just take all this booty and hide it
  3059.            away with me chest deep in the maze!~ He snatches your treasure
  3060.            and vanishes into the gloom.";
  3061.        ];
  3062.  
  3063. ! ----------------------------------------------------------------------------
  3064. !   The cave is closing now...
  3065. ! ----------------------------------------------------------------------------
  3066.  
  3067. Object cave_closer
  3068.   with daemon
  3069.        [; if (treasures_found < MAX_TREASURES) return;
  3070.           StopDaemon(self);
  3071.           caves_closed=1;
  3072.  
  3073.           score=score + 25;
  3074.  
  3075.           remove CrystalBridge;
  3076.           give Grate locked ~open; remove set_of_keys;
  3077.  
  3078.           StopDaemon(dwarf); StopDaemon(pirate);
  3079.           remove Troll; remove Bear; remove Dragon;
  3080.  
  3081.           StartTimer(endgame_timer, 25);
  3082.  
  3083.           "^A sepulchral voice reverberating through the cave says, 
  3084.            ~Cave closing soon. All adventurers exit immediately 
  3085.            through main office.~";
  3086.        ];
  3087.  
  3088. Object endgame_timer
  3089.   with time_left 0,
  3090.        time_out
  3091.        [; score=score + 10;
  3092.  
  3093.           while (child(player)~=0) remove child(player);
  3094.  
  3095.           move bottle to At_Ne_End;
  3096.           if (child(bottle)~=0) remove child(bottle);
  3097.  
  3098.           move giant_bivalve to At_Ne_End;
  3099.           move brass_lantern to At_Ne_End;
  3100.           move black_rod to At_Ne_End;
  3101.           move little_bird to At_Sw_End;
  3102.           move velvet_pillow to At_Sw_End;
  3103.  
  3104.          print "^The sepulchral voice intones, ~The cave is now 
  3105.           closed.~ As the echoes fade, there is a blinding flash of 
  3106.           light (and a small puff of orange smoke). . .^^
  3107.           As your eyes refocus, you look around...^";
  3108.           PlayerTo(At_Ne_End);
  3109.        ];
  3110.  
  3111. ! ----------------------------------------------------------------------------
  3112. !   The End Game
  3113. ! ----------------------------------------------------------------------------
  3114.  
  3115. Object At_Ne_End "NE End of Repository"
  3116.   with description "You are at the northeast end of an immense 
  3117.                room, even larger than the giant room. It appears to 
  3118.                be a repository for the ~Adventure~ program. 
  3119.                Massive torches far overhead bathe the room with 
  3120.                smoky yellow light. Scattered about you can be seen 
  3121.                a pile of bottles (all of them empty), a nursery of 
  3122.                young beanstalks murmuring quietly, a bed of oysters, 
  3123.                a bundle of black rods with rusty stars on their 
  3124.                ends, and a collection of brass lanterns. Off to one 
  3125.                side a great many dwarves are sleeping on the floor, 
  3126.                snoring loudly. A sign nearby reads: ~Do not 
  3127.                disturb the dwarves!~",
  3128.        sw_to At_Sw_End
  3129.   has  light;
  3130.  
  3131.  
  3132. Object -> "enormous mirror"
  3133.   with description "It looks like an ordinary, albeit enormous, mirror.",
  3134.        name "mirror" "enormous" "huge" "big" "large" "suspended"
  3135.             "hanging" "vanity" "dwarvish",
  3136.        initial "An immense mirror is hanging against one wall, 
  3137.                and stretches to the other end of the room, where 
  3138.                various other sundry objects can be glimpsed dimly in 
  3139.                the distance.",
  3140.        found_in At_Ne_End At_Sw_End,
  3141.        before
  3142.        [;
  3143.           Attack:
  3144.              print "You strike the mirror a resounding blow, whereupon 
  3145.                     it shatters into a myriad tiny fragments.^^";
  3146.              SleepingDwarves.wake_up(); rtrue;
  3147.        ],
  3148.   has  static;
  3149.  
  3150.  
  3151. Object -> "collection of adventure game materials"
  3152.   with description
  3153.                "You've seen everything in here already, albeit 
  3154.                in somewhat different contexts.",
  3155.        name "stuff" "junk" "materials" "torches" "objects"
  3156.        "adventure" "repository" "massive" "sundry",
  3157.        before
  3158.        [; Take: "Realizing that by removing the loot here you'd be 
  3159.                  ruining the game for future players, you leave the 
  3160.                  ~Adventure~ materials where they are.";
  3161.        ],
  3162.   has  scenery;
  3163.  
  3164.  
  3165. Object -> SleepingDwarves "sleeping dwarves"
  3166.   with description "I wouldn't bother the dwarves if I were you.",
  3167.        name "dwarf" "dwarves" "sleeping" "snoring" "dozing" "snoozing",
  3168.        article "hundreds of angry",
  3169.        before
  3170.        [; 
  3171.           Take: "What, all of them?";
  3172.        ],
  3173.        life
  3174.        [; WakeOther:
  3175.               print "You prod the nearest dwarf, who wakes up grumpily, 
  3176.                      takes one look at you, curses, and grabs for his 
  3177.                      axe.^^";
  3178.               self.wake_up(); rtrue;
  3179.           Attack: self.wake_up(); rtrue;
  3180.        ],
  3181.        wake_up
  3182.        [;     deadflag=1;
  3183.              "The resulting ruckus has awakened the dwarves. There 
  3184.               are now dozens of threatening little dwarves in the room with 
  3185.               you! Most of them throw knives at you! All of them get you!";
  3186.        ],
  3187.   has  animate scenery multitude;
  3188.  
  3189.  
  3190. Object At_Sw_End "SW End of Repository"
  3191.   with description
  3192.                "You are at the southwest end of the repository. 
  3193.                To one side is a pit full of fierce green snakes. On 
  3194.                the other side is a row of small wicker cages, each 
  3195.                of which contains a little sulking bird. In one 
  3196.                corner is a bundle of black rods with rusty marks on 
  3197.                their ends. A large number of velvet pillows are 
  3198.                scattered about on the floor. A vast mirror stretches 
  3199.                off to the northeast. At your feet is a large steel 
  3200.                grate, next to which is a sign which reads, 
  3201.                ~TREASURE VAULT. Keys in main office.~",
  3202.        d_to RepositoryGrate,
  3203.        ne_to At_Ne_End
  3204.   has  light;
  3205.  
  3206.  
  3207. Object -> RepositoryGrate "steel grate"
  3208.   with name "ordinary" "steel" "grate" "grating",
  3209.        description
  3210.                "It just looks like an ordinary steel grate.",
  3211.        when_open "The grate is open.",
  3212.        when_closed "The grate is closed.",
  3213.        door_dir d_to, door_to Outside_Grate, with_key 0
  3214.   has  static door locked openable;
  3215.  
  3216.  
  3217. Object -> "collection of adventure game materials"
  3218.   with description
  3219.                "You've seen everything in here already, albeit 
  3220.                in somewhat different contexts.",
  3221.        name "pit" "snake" "snakes" "fierce" "green"
  3222.             "stuff" "junk" "materials"
  3223.             "adventure" "repository" "massive" "sundry",
  3224.        before
  3225.        [; Take: "Realizing that by removing the loot here you'd be 
  3226.                  ruining the game for future players, you leave the 
  3227.                  ~Adventure~ materials where they are.";
  3228.        ],
  3229.   has  scenery;
  3230.  
  3231. Object -> black_mark_rod "black rod with a rusty mark on the end"
  3232.   with description "It's a three foot black rod with a rusty mark on an end.",
  3233.        initial  "A three foot black rod 
  3234.                  with a rusty mark on one end lies nearby.",
  3235.        name "rod" "black" "rusty" "mark" "three" "foot" "iron" "explosive"
  3236.             "dynamite" "blast",
  3237.        before [; Wave: "Nothing happens."; ];
  3238.  
  3239. ! ----------------------------------------------------------------------------
  3240. !   Some entry points
  3241. ! ----------------------------------------------------------------------------
  3242.  
  3243. [ Initialise;
  3244.   location=At_End_Of_Road; score = 36;
  3245.  
  3246.   StartDaemon(dwarf); StartDaemon(pirate); StartDaemon(cave_closer);
  3247.  
  3248.   print "^^^^^Welcome to Adventure!^^";
  3249. ];
  3250.  
  3251. [ PrintRank;
  3252.   print ", earning you the rank of ";
  3253.   if (score >= 348) "Grandmaster Adventurer!";
  3254.   if (score >= 330) "Master, first class.";
  3255.   if (score >= 300) "Master, second class.";
  3256.   if (score >= 200) "Junior Master.";
  3257.   if (score >= 130) "Seasoned Adventurer.";
  3258.   if (score >= 100) "Experienced Adventurer.";
  3259.   if (score >= 35) "Adventurer.";
  3260.   if (score >= 10) "Novice.";
  3261.   "Amateur.";
  3262. ];
  3263.  
  3264. [ DarkToDark;
  3265.   if (dark_warning == false)
  3266.   {   dark_warning = true;
  3267.       "It is now pitch dark. 
  3268.        If you proceed you will likely fall into a pit.";
  3269.   }
  3270.   if (random(4) == 1)
  3271.   {   deadflag = 1;
  3272.       "You fell into a pit and broke every bone in your body!";
  3273.   }
  3274.   rfalse;
  3275. ];
  3276.  
  3277. ! ----------------------------------------------------------------------------
  3278. !   Menu-driven help (not really a part of the game itself)
  3279. ! ----------------------------------------------------------------------------
  3280.  
  3281. [ HelpMenu;
  3282.   if (menu_item==0)  { item_width=8; item_name="About Adventure";
  3283.                        if (deadflag==2) return 4; else return 3;
  3284.                      }
  3285.   if (menu_item==1)  { item_width=6; item_name="Instructions"; }
  3286.   if (menu_item==2)  { item_width=4; item_name="History";      }
  3287.   if (menu_item==3)  { item_width=6; item_name="Authenticity"; }
  3288.   if (menu_item==4)  { item_width=7; item_name="Did you know..."; }
  3289. ];
  3290.  
  3291. [ HelpInfo;
  3292.  if (menu_item==1)
  3293.  {
  3294.  print "I know of places, actions, and things. You can guide 
  3295.         me using commands that are complete sentences. To move, try 
  3296.         commands like ~enter,~ ~east,~ ~west,~ ~north,~ ~south,~ ~up,~ 
  3297.         ~down,~ ~enter building,~ ~climb pole,~ etc.^^";
  3298.  
  3299.  print "I know about a few special objects, like a black rod 
  3300.         hidden in the cave. These objects can be manipulated using 
  3301.         some of the action words that I know. Usually you will need 
  3302.         to give a verb followed by an object (along with descriptive 
  3303.         adjectives when desired), but sometimes I can infer the 
  3304.         object from the verb alone. Some objects also imply verbs; 
  3305.         in particular, ~inventory~ implies ~take inventory~, 
  3306.         which causes me to give you a list of what you're carrying. 
  3307.         The objects have side effects; for instance, the rod scares 
  3308.         the bird.^^";
  3309.  
  3310.  print "Many commands have abbreviations. For example, you can 
  3311.         type ~i~ in place of ~inventory,~ ~x object~ instead of 
  3312.         ~examine object,~ etc.^^";
  3313.  
  3314.  print "Usually people having trouble moving just need to try a 
  3315.         few more words. Usually people trying unsuccessfully to 
  3316.         manipulate an object are attempting something beyond their 
  3317.         (or my!) capabilities and should try a completely different 
  3318.         tack.^^";
  3319.  
  3320.  print "Note that cave passages turn a lot, and that leaving a room 
  3321.         to the north does not guarantee 
  3322.         entering the next from the south.^^";
  3323.  
  3324.  print "If you want to end your adventure early, type ~quit~. 
  3325.         To suspend your adventure such that you can continue later, 
  3326.         type ~save,~ and to resume a saved game, type ~restore.~ 
  3327.         To see how well you're doing, type ~score~. To get full 
  3328.         credit for a treasure, you must have left it safely in the 
  3329.         building, though you get partial credit just for locating it. 
  3330.         You lose points for getting killed, or for quitting, though 
  3331.         the former costs you more. There are also points based on how 
  3332.         much (if any) of the cave you've managed to explore; in 
  3333.         particular, there is a large bonus just for getting in (to 
  3334.         distinguish the beginners from the rest of the pack), and 
  3335.         there are other ways to determine whether you've been through 
  3336.         some of the more harrowing sections.^^";
  3337.  
  3338.  print "If you think you've found all the treasures, just keep 
  3339.         exploring for a while. If nothing interesting happens, you 
  3340.         haven't found them all yet. If something interesting *does* 
  3341.         happen, it means you're getting a bonus and have an 
  3342.         opportunity to garner many more points in the master's 
  3343.         section.^^";
  3344.  
  3345.         "Good luck!";
  3346.  }
  3347.  if (menu_item==2)
  3348.  {
  3349.  print "Perhaps the first adventurer was a mulatto slave named Stephen 
  3350.         Bishop, born about 1820: `slight, graceful, and very handsome'; 
  3351.         a `quick, daring, enthusiastic' guide to the Mammoth Cave in the 
  3352.         Kentucky karst. The story of the Cave is a curious microcosm of 
  3353.         American history. Its discovery is a matter of legend dating 
  3354.         back to the 1790s; it is said that a hunter, John Houchin, 
  3355.         pursued a wounded bear to a large pit near the Green River and ";
  3356.  print "stumbled upon the entrance. The entrance was thick with bats and 
  3357.         by the War of 1812 was intensively mined for guano, dissolved into 
  3358.         nitrate vats to make saltpetre for gunpowder. After the war prices 
  3359.         fell; but the Cave became a minor side-show when a dessicated Indian 
  3360.         mummy was found nearby, sitting upright in a stone coffin, surrounded 
  3361.         by talismans. In 1815, Fawn Hoof, as she was nicknamed after one of 
  3362.         the charms, was taken away by a circus, drawing crowds across America 
  3363.         (a tour rather reminiscent of Don McLean's song `The Legend of Andrew 
  3364.         McCrew'). She ended up in the Smithsonian but by the 1820s the Cave 
  3365.         was being called one of the wonders of the world, largely due to her 
  3366.         posthumous efforts.^^";
  3367.  
  3368.  print "By the early nineteenth century European caves were big tourist 
  3369.         attractions, but hardly anyone visited the Mammoth, `wonder of the 
  3370.         world' or not. Nor was it then especially large (the name was a 
  3371.         leftover from the miners, who boasted of their mammoth yields of 
  3372.         guano). In 1838, Stephen Bishop's owner bought up the Cave. 
  3373.         Stephen, as (being a slave) he was invariably called, was by any 
  3374.         standards a remarkable man: self-educated in Latin and Greek, he 
  3375.         became famous as the `chief ruler' of his underground realm. He ";
  3376.  print "explored and named much of the layout in his spare time, doubling 
  3377.         the known map in a year. The distinctive flavour of the Cave's 
  3378.         names - half-homespun American, half-classical - started with 
  3379.         Stephen: the River Styx, the Snowball Room, Little Bat Avenue, 
  3380.         the Giant Dome. Stephen found strange blind fish, snakes, silent 
  3381.         crickets, the remains of cave bears (savage, playful creatures, 
  3382.         five feet long and four high, which became extinct at the end of 
  3383.         the last Ice Age), centuries-old Indian gypsum workings and ever 
  3384.         more cave. His 1842 map, drafted entirely from memory, was still 
  3385.         in use forty years later.^^";
  3386.  print "As a tourist attraction (and, since Stephen's owner was a 
  3387.         philanthropist, briefly a sanatorium for tuberculosis, owing to a 
  3388.         hopeless medical theory) the Cave became big business: for decades 
  3389.         nearby caves were hotly seized and legal title endlessly challenged. 
  3390.         The neighbouring chain, across Houchins Valley in the Flint Ridge, 
  3391.         opened the Great Onyx Cave in 1912. By the 1920s, the Kentucky Cave ";
  3392.  print "Wars were in full swing. Rival owners diverted tourists with fake 
  3393.         policemen, employed stooges to heckle each other's guided tours, 
  3394.         burned down ticket huts, put out libellous and forged advertisements. 
  3395.         Cave exploration became so dangerous and secretive that finally in 
  3396.         1941 the U.S. Government stepped in, made much of the area a National 
  3397.         Park and effectively banned caving. The gold rush of tourists was, 
  3398.         in any case, waning.^^";
  3399.  
  3400.  print "Convinced that the Mammoth and Flint Ridge caves were all linked in 
  3401.         a huge chain, explorers tried secret entrances for years, eventually 
  3402.         winning official backing. Throughout the 1960s all connections from 
  3403.         Flint Ridge - difficult and water-filled tunnels - ended 
  3404.         frustratingly in chokes of boulders. A `reed-thin' physicist, 
  3405.         Patricia Crowther, made the breakthrough in 1972 when she got through 
  3406.         the Tight Spot and found a muddy passage: it was a hidden way into 
  3407.         the Mammoth Cave.^^";
  3408.  
  3409.  print "Under the terms of his owner's will, Stephen Bishop was freed in 
  3410.         1856, at which time the cave boasted 226 avenues, 47 domes, 23 pits 
  3411.         and 8 waterfalls. He died a year later, before he could buy his 
  3412.         wife and son. In the 1970s, Crowther's muddy passage was found on 
  3413.         his map.^^";
  3414.  
  3415.  print "The Mammoth Cave is huge, its full extent still a matter of 
  3416.         speculation (estimates vary from 300 to 500 miles). Although this
  3417.         game has often been called ~Colossal Cave~, it is actually a
  3418.         simulation of the Bedquilt Cave region. Here is Will Crowther's
  3419.         story of how it came about:^^";
  3420.         
  3421.  print "~I had been involved in a non-computer role-playing game called
  3422.         Dungeons and Dragons at the time, and also I had been actively
  3423.         exploring in caves - Mammoth Cave in Kentucky in particular.
  3424.         Suddenly, I got involved in a divorce, and that left me a bit
  3425.         pulled apart in various ways. In particular I was missing my
  3426.         kids. Also the caving had stopped, because that had become
  3427.         awkward, so I decided I would fool around and write a program
  3428.         that was a re-creation in fantasy of my caving, and also would
  3429.         be a game for the kids, and perhaps some aspects of the
  3430.         Dungeons and Dragons that I had been playing.^^";
  3431.  
  3432.  print "~My idea was that it would be a computer game that would not be
  3433.         intimidating to non-computer people, and that was one of the reasons
  3434.         why I made it so that the player directs the game with natural
  3435.         language input, instead of more standardized commands. My kids
  3436.         thought it was a lot of fun.~  [Quoted in ~Genesis II: Creation
  3437.         and Recreation with Computers~, Dale Peterson (1983).]^^";
  3438.  
  3439.  print "Crowther's original FORTRAN program had five or so treasures, but
  3440.         no formal scoring. The challenge was really to explore, though
  3441.         there was opposition from for instance the snake. Like the real
  3442.         Bedquilt region, Crowther's simulation has a map on about four
  3443.         levels of depth and is rich in geological detail. A good example 
  3444.         is the orange column which descends to the Orange River Rock room 
  3445.         (where the bird lives): the real column is of orange travertine,
  3446.         a beautiful mineral found in wet limestone.^^";
  3447.         
  3448.  print "The game's language is loaded with references to caving, to `domes' 
  3449.         and `crawls'. A `slab room', for instance, is a very old cave whose 
  3450.         roof has begun to break away into sharp flakes which litter the 
  3451.         floor in a crazy heap. The program's use of the word `room' for 
  3452.         all manner of caves and places seems slightly sloppy in everyday ";
  3453.  print "English, but is widespread in American caving and goes back as far 
  3454.         as Stephen Bishop: so the Adventure-games usage of the word `room' 
  3455.         to mean `place' may even be bequeathed from him.^^";
  3456.  
  3457.  print "The game took its decisive step toward puzzle-solving when Don Woods,
  3458.         a student at Stanford, debugged and expanded it. He tripled the
  3459.         number of treasures and added the non-geological zones: everything
  3460.         from the Troll Bridge onward, together with most of the antechambers
  3461.         on the Bedquilt level. All of the many imitations and extensions
  3462.         of the original Adventure are essentially based on Woods's 350-point
  3463.         edition. (Many bloated, corrupted or enhanced - it depends how you
  3464.         see it - versions of the game are in Internet circulation, and the
  3465.         most useful way to identify them is by the maximum attainable score.
  3466.         Many versions exist scoring up to around the 400s and 500s, and one
  3467.         up to 1000. Woods himself continues to release new versions of his
  3468.         game; most of the other extenders haven't his talent.)^^";
  3469.  
  3470.  print "Although the game has veered away from pure simulation, a good
  3471.         deal of it remains realistic. Cavers do turn back when their carbide
  3472.         lamps flicker; there are indeed mysterious markings and initials on
  3473.         the cave walls, some left by the miners, some by Bishop, some by
  3474.         1920s explorers. Of course there isn't an active volcano in central
  3475.         Kentucky, nor are there dragons and dwarves. But even these
  3476.         embellishments are, in a sense, derived ";
  3477.  print "from tradition: like most of the early role-playing games, 
  3478.         `Adventure' owes much to J. R. R. Tolkien's `The Hobbit', and the 
  3479.         passage through the mountains and Moria of `The Lord of the Rings' 
  3480.         (arguably its most dramatic and atmospheric passage). Tolkien 
  3481.         himself, the most successful myth-maker of the twentieth century, 
  3482.         worked from the example of Icelandic, Finnish and Welsh sagas.^^";
  3483.  
  3484.  print "By 1977 tapes of `Adventure' were being circulated widely, by the 
  3485.         Digital user group DECUS, amongst others: taking over lunchtimes 
  3486.         and weekends wherever it went... but that's another story. (Tracy 
  3487.         Kidder's fascinating book `The Soul of a New Machine', a 
  3488.         journalist's-eye-view of a mainframe computer development group,
  3489.         catches it well.)^^";
  3490.  
  3491.        "This is a copy at third or fourth hand: from Will Crowther's original
  3492.         to Donald Woods's 350-point edition to Donald Ekman's PC port to
  3493.         David M. Baggett's excellent TADS version (1993), to this.^^";
  3494.  }
  3495.  
  3496.  if (menu_item==3)
  3497.  {
  3498.  print "This port is fairly close to the original. The puzzles, items and 
  3499.         places of Woods's original 350-point version are exactly those here.^^";
  3500.  
  3501.  print "I have added a few helpful messages, such as ~This is a dead end.~, 
  3502.         here and there: and restored some ~initial position~ messages from 
  3503.         objects, such as the (rather lame)^
  3504.         ^  There is tasty food here.^^
  3505.         from source files which are certainly early but of doubtful 
  3506.         provenance. They seem to sit well with the rest of the text.^^";
  3507.  
  3508.  print "The scoring system is the original, except that you no longer lose 4 
  3509.         points for quitting (since you don't get the score if you quit an 
  3510.         Inform game, this makes no difference) and, controversially, I award 
  3511.         5 points for currently carrying a treasure, as some early 1980s 
  3512.         ports did. The rank names are tidied up a little. The only 
  3513.         significant rule change is that one cannot use 
  3514.         magic words until their destinations have been visited.^^";
  3515.  
  3516.  print "The dwarves are simpler in their movements, but on the other hand I 
  3517.         have added a very few messages to make them interact better with the 
  3518.         rest of the game. The probabilities are as in the original game.^^";
  3519.  
  3520.  print "In the original one could type the name of a room to visit it: for 
  3521.         the sake of keeping the code small, I have omitted this feature, but 
  3522.         with some regrets.^^";
  3523.  
  3524.  print "The text itself is almost everywhere preserved intact, but I've 
  3525.         corrected some spelling and grammatical mistakes (and altered a 
  3526.         couple of utterly misleading and gnomic remarks). The instructions 
  3527.         have been slightly altered (for obvious reasons) but are basically 
  3528.         as written.^^";
  3529.  
  3530.        "A good source for details is David Baggett's source code, which is 
  3531.         circulated on the Internet.";
  3532.  }
  3533.  
  3534.  print "Did you know that...^^";
  3535.  
  3536.  print "The five dwarves have a 96% chance of following you, except into 
  3537.         light, down pits or when admiring themselves: and the nasty little 
  3538.         knives are 9.5% accurate.^^";
  3539.  
  3540.  print "Dragons burn up dwarves (perhaps because dwarves eat only coal).^^";
  3541.  
  3542.  print "The bear (who likes the volcano) is too heavy for the bridge... 
  3543.         and you can go back to the scene after being resurrected.^^";
  3544.  
  3545.  print "You can slip past the snake into the secret E/W canyon, 
  3546.         35% of the time at any rate. And walking about in the dark 
  3547.         is not all that gruesome: it carries only a 25% risk of falling 
  3548.         down a pit.^^";
  3549.  
  3550.  print "The vase does not like being immersed.^^";
  3551.  
  3552.  print "Shadowy figures can wave to each other.^^";
  3553.  
  3554.  print "Watering the hinges of the door rusts them up again.^^";
  3555.  
  3556.  print "When the cave closes, the grate is locked and the keys are thrown 
  3557.         away, creatures run off and the crystal bridge vanishes...^^";
  3558.  
  3559.  print "...and a completely useless hint is written on the giant oyster's 
  3560.         shell in the end game.^^";
  3561.  
  3562.        "The last lousy point can be won by... but no. That would be telling.";
  3563.  
  3564. ];
  3565.  
  3566. [ HelpSub;
  3567.  
  3568.  if (deadflag~=2)
  3569.  DoMenu("There is information provided on the following:^
  3570.          ^     Instructions for playing
  3571.          ^     A historical preface
  3572.          ^     How authentic is this edition?^",
  3573.          HelpMenu, HelpInfo);
  3574.  else
  3575.  DoMenu("There is information provided on the following:^
  3576.          ^     Instructions for playing
  3577.          ^     A historical preface
  3578.          ^     How authentic is this edition?
  3579.          ^     Did you know...^",
  3580.          HelpMenu, HelpInfo);
  3581.  
  3582. ];
  3583.  
  3584. [ Amusing; HelpSub(); ];
  3585.  
  3586. ! ----------------------------------------------------------------------------
  3587. !   New verbs (to add to the library stock)
  3588. ! ----------------------------------------------------------------------------
  3589.  
  3590. [ CatchSub;
  3591.   "You can't catch ", (the) noun, ".";
  3592. ];
  3593.  
  3594. [ ReleaseSub;
  3595.   "You can't release ", (the) noun, ".";
  3596. ];
  3597.  
  3598. [ WaterSub;
  3599.   if (bottle in player) <<Empty bottle>>;
  3600.   "Water? What water?";
  3601. ];
  3602.  
  3603. [ OilSub;
  3604.   if (bottle in player) <<Empty bottle>>;
  3605.   "Oil? What oil?";
  3606. ];
  3607.  
  3608. [ OnSub; if (brass_lantern notin player) "You have no lamp.";
  3609.   <<SwitchOn brass_lantern>>;
  3610. ];
  3611.  
  3612. [ OffSub; if (brass_lantern notin player) "You have no lamp.";
  3613.   <<SwitchOff brass_lantern>>;
  3614. ];
  3615.  
  3616. [ XyzzySub; "Nothing happens."; ];
  3617. [ PlughSub; "Nothing happens."; ];
  3618. [ PloverSub; "Nothing happens."; ];
  3619. [ FeeSub; FthingSub(0); ];
  3620. [ FieSub; FthingSub(1); ];
  3621. [ FoeSub; FthingSub(2); ];
  3622. [ FooSub; FthingSub(3); ];
  3623.  
  3624. [ FthingSub i;
  3625.  
  3626.   if (feefie_count~=i) { feefie_count=0; "Get it right, dummy!"; }
  3627.  
  3628.   if (feefie_count++ == 3)
  3629.   {   feefie_count=0;
  3630.       if (golden_eggs in In_Giant_Room) "Nothing happens.";
  3631.       if ((golden_eggs in player) || (golden_eggs in location))
  3632.           print "The nest of golden eggs has vanished!^";
  3633.       else print "Done!";
  3634.       if (golden_eggs in player) score=score-5;
  3635.       if (golden_eggs in Inside_Building)
  3636.           score=score-golden_eggs.depositpoints;
  3637.       move golden_eggs to In_Giant_Room;
  3638.       if (location==In_Giant_Room)
  3639.         "^^A large nest full of golden eggs suddenly appears out of nowhere!";
  3640.   }
  3641.   else "Ok.";
  3642. ];
  3643.  
  3644. [ CountSub;
  3645.     if (noun has multitude) "There are a multitude.";
  3646.     "I see one (1) ", (name) noun, ".";
  3647. ];
  3648. [ UseSub; "You'll have to be a bit more explicit than that."; ];
  3649. [ BlastWithSub;
  3650.      if (second~=black_mark_rod) "Blasting requires dynamite.";
  3651.      "Been eating those funny brownies again?";
  3652. ];
  3653. [ OldMagicSub; "Good try, but that is an old worn-out magic word."; ];
  3654. [ KickSub; <<Attack noun>>; ]; ! For kicking dwarves
  3655.  
  3656. [ BlastSub;
  3657.   if (location~=At_Sw_End or At_Ne_End) "Frustrating, isn't it?";
  3658.   if (location==At_Sw_End && parent(black_mark_rod)==At_Ne_End)
  3659.   {   score=score+35;
  3660.       deadflag=2;
  3661.       "There is a loud explosion, and a twenty-foot 
  3662.        hole appears in the far wall, burying the dwarves in 
  3663.        the rubble. You march through the hole and find 
  3664.        yourself in the main office, where a cheering band of 
  3665.        friendly elves carry the conquering adventurer off 
  3666.        into the sunset.";
  3667.   }
  3668.   if (location==At_Ne_End && parent(black_mark_rod)==At_Sw_End)
  3669.   {   score=score+20;
  3670.       deadflag=1;
  3671.       "There is a loud explosion, and a twenty-foot 
  3672.        hole appears in the far wall, burying the snakes in 
  3673.        the rubble. A river of molten lava pours in through 
  3674.        the hole, destroying everything in its path, 
  3675.        including you!";
  3676.   }
  3677.   deadflag=1;
  3678.   "There is a loud explosion, and you are suddenly 
  3679.    splashed across the walls of the room.";
  3680. ];
  3681.  
  3682. ! ----------------------------------------------------------------------------
  3683. !   Resurrection
  3684. ! ----------------------------------------------------------------------------
  3685.  
  3686. [ AfterLife o;
  3687.   if (deadflag==3) { deadflag=1; rfalse; }
  3688.   print "^^";
  3689.   if (caves_closed) 
  3690.       "It looks as though you're dead. Well, seeing as how 
  3691.        it's so close to closing time anyway, I think we'll 
  3692.        just call it a day.";
  3693.   if (deaths==0)
  3694.     print "Oh dear, you seem to have gotten yourself killed. I 
  3695.        might be able to help you out, but I've never really 
  3696.        done this before. Do you want me to try to 
  3697.        reincarnate you?^^";
  3698.   if (deaths==1)
  3699.     print "You clumsy oaf, you've done it again! I don't know 
  3700.        how long I can keep this up. Do you want me to try 
  3701.        reincarnating you again?^^";
  3702.   if (deaths==2)
  3703.     print "Now you've really done it! I'm out of orange smoke! 
  3704.        You don't expect me to do a decent reincarnation 
  3705.        without any orange smoke, do you?^^";
  3706.  
  3707.   print "> ";
  3708.   if (YesOrNo() == false)
  3709.   {   switch(deaths)
  3710.       {   0: "Very well.";
  3711.           1: "Probably a wise choice.";
  3712.           2: "I thought not!";
  3713.       }
  3714.   }
  3715.  
  3716.   switch(deaths)
  3717.   {   0: print "All right. But don't blame me if something 
  3718.              goes wr......^^^^
  3719.              --- POOF!! ---^^
  3720.              You are engulfed in a cloud of orange smoke. 
  3721.              Coughing and gasping, you emerge from the smoke and 
  3722.              find that you're....^";
  3723.       1: print "Okay, now where did I put my orange smoke?.... >POOF!<
  3724.              ^^Everything disappears in a dense cloud of orange smoke.^";
  3725.       2: "Okay, if you're so smart, do it yourself! I'm leaving!";
  3726.   }
  3727.  
  3728.   deaths++; score=score-10;
  3729.  
  3730.   if (location~=thedark)
  3731.   {   while (child(player) ~= nothing)
  3732.       {   o=child(player);
  3733.           move o to location;
  3734.           if (o ofclass Treasure) score=score-5;
  3735.       }
  3736.   }
  3737.   else
  3738.   {   while (child(player) ~= nothing) move child(player) to real_location;
  3739.   }
  3740.  
  3741.   move brass_lantern to At_End_Of_Road; give brass_lantern ~on ~light;
  3742.   remove dwarf;
  3743.   deadflag=0;
  3744.   PlayerTo(Inside_Building);
  3745. ];
  3746.  
  3747. ! ----------------------------------------------------------------------------
  3748. !   How to cheat in the test version: no dwarves or pirates, and magic words
  3749. !   working from the beginning
  3750. ! ----------------------------------------------------------------------------
  3751.  
  3752. #IFDEF TEST_VERSION;
  3753. [ XdetermSub; StopDaemon(dwarf); StopDaemon(pirate);
  3754.   give In_Debris_Room visited; give At_Y2 visited; give In_Plover_Room visited;
  3755. ];
  3756. #ENDIF;
  3757.  
  3758. ! ----------------------------------------------------------------------------
  3759. !   Grammar: the usual grammar and some extensions
  3760. ! ----------------------------------------------------------------------------
  3761.  
  3762. Include "Grammar";
  3763.  
  3764. Verb "on"
  3765.                 *                                -> On;
  3766. Verb "off"
  3767.                 *                                -> Off;
  3768.  
  3769. Verb "catch" "capture"
  3770.                 * creature                       -> Catch
  3771.                 * creature "with" held           -> Catch;
  3772. Verb "release" "free"
  3773.                 * creature                       -> Release;
  3774. Verb "pour" "douse"
  3775.                 * "water" "on" noun              -> Water
  3776.                 * "oil" "on" noun                -> Oil
  3777.                 * noun                           -> Empty;
  3778. Verb "water"    * noun                           -> Water;
  3779. Verb "oil" "grease" "lubricate"
  3780.                 * noun                           -> Oil;
  3781. Verb "plugh"    *                                -> Plugh;
  3782. Verb "xyzzy"    *                                -> Xyzzy;
  3783. Verb "plover"   *                                -> Plover;
  3784. Verb "sesame" "shazam" "hocus" "abracadabra"
  3785.      "foobar" "open-sesame" "frotz"
  3786.                 *                                -> OldMagic;
  3787. Verb "fee"      *                                -> Fee;
  3788. Verb "fie"      *                                -> Fie;
  3789. Verb "foe"      *                                -> Foe;
  3790. Verb "foo"      *                                -> Foo;
  3791.  
  3792. Verb "help"     *                                -> Help;
  3793. Verb "kick"     * noun                           -> Kick;
  3794. Verb "count"    * noun                           -> Count;
  3795. Verb "use"      *                                -> Use;
  3796. Verb "blast"    *                                -> Blast
  3797.                 * noun "with" held               -> BlastWith;
  3798.  
  3799. #IFDEF TEST_VERSION;
  3800. Verb "xdeterm"  *                                -> Xdeterm;
  3801. #ENDIF;
  3802.  
  3803. ! ----------------------------------------------------------------------------
  3804.